File extension

Updated: 06/27/2017 by Computer Hope

.txtA file extension or file name extension is the ending of a file that helps identify the type of file in operating systems such as Microsoft Windows. In Microsoft Windows, the file name extension is a period that is often followed by three characters, but may also be one, two, or four characters long. For example, the file name "myfile.txt" has an extension of ".txt", which is a file name extension associated with text files.

File list in explorer with name and file extension

In the above example, the first file shown in Explorer is "Regedit.exe", "Regedit" is the name of the file, and ".exe" is the file extension that identifies this file as an executable file. The next file "RtlExUpd.dll", which is a DLL file and another example of a file, and finally the last two files are log files. As can be seen in this example, by having file name extensions you can quickly identify the type of file and have a better idea of how that file may be opened.

Tip: If you are trying to find a file with a specific file extension, use wildcards in your search.

What makes a valid file name extension?

As mentioned earlier a file name extension is typically between one and three characters and will always be at the end of the file name separated by a period. Some programs also support file extensions that are more than three characters. For example, all of the latest versions of Microsoft Word support .docx document files and most web pages end with the .html file extension.

Note: In all new versions of Microsoft Windows by default the file extensions are hidden, and you must have show file extensions enabled to view and edit file extensions.

Can a file extension be longer than three or four characters?

Yes. As long as the program has been designed to identify and open a program with a longer file extension, it can be longer than four characters. However, to keep the overall file name short most programs do not exceed four characters.

Is there a limit to how long a file extension can be?

There is no limit to the length of a file extension as long as the file name and file extension combined do not exceed to maximum file name character limit of the operating system. Below is a list of Microsoft Windows versions and their file name character limit.

Windows 10 - 260 character limit
Windows 8 - 260 character limit
Windows 7 - 260 character limit
Windows Vista - 260 character limit
Windows XP - 255 character limit
Windows 2000 - 254 character limit

How many types of file extensions are there?

There are thousands of file extensions that can each be associated with one or more applications. See the full list below for a listing of file extensions and their associated programs.

Extension, File, File format, File name