Glossary · Operating Systems & Software

File Extension

A file extension is the suffix after the last dot in a filename, such as .pdf or .jpg, that hints at the file's format and which program opens it.

Updated October 6, 2026

A file extension is the short suffix at the end of a filename, usually after the final dot, that indicates the file's type. Operating systems use it to pick the default program that opens the file.

Why it matters

Extensions make it easy to recognize formats at a glance, but they are only labels. The real format is determined by the file's contents. Web servers also map extensions to MIME types, so a wrong mapping can make a browser download a page instead of showing it.

Some systems hide known extensions by default, which attackers exploit.

Example

report.pdf        -> PDF document
archive.tar.gz    -> tar archive, gzip compressed
invoice.pdf.exe   -> actually an executable

The last name tries to look like a PDF. Showing full extensions reveals the trick.

Common misconceptions

  • Renaming a .png to .jpg and expecting it to convert; the contents stay the same.
  • Trusting a file because of its extension; check the type with the file command.
  • Leaving extensions hidden in the file explorer.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.