Glossary

File Extension

The suffix at the end of a filename (e.g. .pdf, .jpg, .zip) that indicates the file's format and which application should open it.

Last updated

What Is a File Extension?

A file extension is the part of a filename that comes after the last period. It serves as a quick signal to the operating system and applications about what type of data the file contains.

Examples:

  • invoice.pdf → the extension is .pdf
  • photo.jpg → the extension is .jpg
  • archive.zip → the extension is .zip

What the Extension Actually Does

The extension tells the operating system which application to use when you double-click the file. On Windows, this mapping is stored in the registry. On macOS, it is managed by Launch Services.

Important: The extension is just text — part of the filename. It does not guarantee the file actually contains that type of data. A text file renamed to document.pdf still contains text, not PDF data. Most applications verify the file's internal structure (the magic bytes or file header) rather than relying solely on the extension.

What Happens If You Change the Extension?

Renaming photo.jpg to photo.png does not convert the file — it only changes the label. The file still contains JPEG data. Some applications will refuse to open it; others may open it regardless because they check the file header, not the extension.

To actually convert a file to a different format, use a proper conversion tool.

Common File Extensions Reference

ExtensionFormatMIME Type
.pdfPDF Documentapplication/pdf
.jpg / .jpegJPEG Imageimage/jpeg
.pngPNG Imageimage/png
.webpWebP Imageimage/webp
.gifGIF Imageimage/gif
.zipZIP Archiveapplication/zip
.docxWord Documentapplication/vnd.openxmlformats...
.xlsxExcel Spreadsheetapplication/vnd.openxmlformats...
.mp4MPEG-4 Videovideo/mp4
.mp3MP3 Audioaudio/mpeg