Files, Data & Storage

File extension

Also known as: filename extension, file type extension, file suffix

A file extension is the group of letters after the last dot in a file name, such as .docx for Word documents, .jpg for photos, .pdf for PDFs, and .exe for Windows programs.

Operating systems use extensions to decide which app opens a file and which icon to show. Windows hides common extensions by default, which scammers exploit by naming malware something like 'invoice.pdf.exe.' While extensions are a helpful label, they can be changed freely, so they don't guarantee what a file really contains.

File extension, explained at three levels

At home

A file extension is like the label on a jar in your pantry. It tells you, and your computer, what's inside and how to use it.

At work

Showing file extensions helps staff spot dangerous attachments disguised as harmless documents.

Real-world examples

At home

Sophie received an email attachment called 'receipt.pdf.' After turning on file extensions, she saw it was really 'receipt.pdf.exe' and deleted it.

At work

Marcus's Calgary MSP enabled visible file extensions on every client PC and blocked executable attachments, reducing malware infections from email.

How it compares

featureOpens withRisk
.docx / .xlsxWord / ExcelLow, unless macros
.pdfPDF readerLow to moderate
.exe / .msiRuns as a programHigh from unknown senders
.zip / .isoArchive or disk toolCan hide risky files

Program and container extensions deserve the most caution.

For analysts

In security awareness training, I'd show staff how to reveal file extensions. It's a five-second habit that defeats a very common phishing trick.

History & origin

Early operating systems such as CP/M in the 1970s and MS-DOS in 1981 used '8.3' file names: up to eight characters, a dot, and a three-letter extension, which is why many extensions are three letters long. Windows 95 introduced long file names and began hiding known extensions by default to simplify things for users. Classic Mac OS used hidden type and creator codes instead of extensions, while Mac OS X adopted extensions in 2001. Microsoft Office's 2007 release introduced four-letter extensions such as .docx and .xlsx for its new XML-based formats. In my view, turning on file extensions in Windows is one of the simplest anti-scam settings anyone can change.