What Is a File Extension?

File Extensions, Extensions vs Formats, Executable Extensions, & More

Files in a folder

photo courtesy of Jordan Winston

A file extension sometimes called a file suffix or a filename extension is the character or group of characters after the period that makes up an entire file name.

The file extension helps an operating system, like Windows or Mac OSX, determine which program on your computer the file is associated with.

For example, the file myhomework.docx ends in docx, a file extension that is associated with Microsoft Word on your computer. When you attempt to open this file, Windows sees that the file ends in a DOCX extension, which it already knows should be opened by the Microsoft Word program.

File extensions also often indicate the file type, or file format, of the file, but not always. Any file's extensions can be renamed but that won't convert the file to another format or change anything about the file other than this portion of its name.

File Extensions vs File Formats

File extensions and file formats are often spoken about interchangeably. In reality, however, a file extension is just the characters that appear after the period, while the file format speaks to the way in which the data in the file is organized.

For example, in the file name mydata.csv, the file extension is csv, indicating that this is a CSV file. A computer user could rename that file to mydata.mp3, however that wouldn't mean you could play the file on a smartphone. The file itself is still rows of text (a CSV file), not a compressed musical recording (an MP3 file).

Changing the Program That Opens a File

File extensions help Windows, or other operating systems you're using, determine which program to use to open those types of file. Most file extensions, especially those used by common image, audio, and video formats, are usually compatible with more than one program you have installed.

If there are multiple programs that can open a file, you can open them using a program of your choice in Windows. On a MAC's operating system, simply right click on the file, select Open With... and you will see a selection of programs you can use to open the file (including the default program option.

Converting Files From One Format to Another

Simply renaming a file to change its extension won't change what type of file it is, even though it might appear as though that happened when Windows shows the icon associated with the new file extension.

To truly change the type of file, it has to be converted using a program that supports both types of files or a dedicated tool designed to convert the file from the format it's in to the format you want it to be in.

For example, let's say you have an SRF image file from your Sony digital camera but a website you want to upload the image to only allows JPEG files. You could rename the file from filename.srf to filename.jpg.

To convert the file from SRF to JPEG, you would need to find a program that fully supports both so you could open the SRF file and then export or save the image as JPG/JPEG. In this example, Adobe Photoshop is a perfect example of an image manipulation program that could do this job.

If you don't have access to a program that natively supports both formats you need, many dedicated file conversion programs are available.

Executable File Extensions

Some file extensions are classified as executable, meaning that when clicked, they don't just open for viewing or playing. Instead, they actually do something all by themselves, like install a program, start a process, run a script, etc.

Because files with these extensions are just a single step away from doing lots of things to your computer, you have to be very careful when you receive executable file extensions like this from a source you don't trust.