Skip to content

IT basics

File extensions: the letters that tell you what a file really is

“Invoice.pdf” looks like a document. “Invoice.pdf.exe” is a program. By default, Windows may show both the same way.

1 min readExplainer

The short version

The letters after the dot in a file name tell your computer what kind of file it is. Showing them helps you spot disguised files.

What an extension is

A file extension is the short code after the last dot in a file’s name. It tells the computer which program should open the file.

Documents and images

  • .docx, .xlsx, .pptx: Word, Excel and PowerPoint files
  • .pdf: documents that look the same everywhere
  • .jpg, .png: pictures
  • .txt, .csv: plain text and simple data

Containers

  • .zip: a compressed folder that can hold other files

Programs and scripts (handle with care)

  • .exe, .msi: Windows programs and installers
  • .bat, .cmd, .ps1, .js, .vbs: scripts that run commands
  • .docm, .xlsm: Office files that contain macros
  • .iso, .img: disk images that can contain programs
  • .lnk: shortcuts that can launch commands

Why it matters

Attackers disguise programs as documents. A file named “Invoice.pdf.exe” shows as “Invoice.pdf” when extensions are hidden, and may even use a PDF icon. Opening it runs a program.

Show extensions on Windows

In File Explorer, select View, then Show, then File name extensions. On older versions, tick File name extensions on the View tab.

On a Mac, open Finder, then Settings, then Advanced, and tick Show all filename extensions.

A simple rule

Be suspicious of any program or script file that arrives by email or download when you were expecting a document.

All case files

Talk to us about your technology

Tell us what you run today and what is getting in the way. We will get back to you about how we can help.

Customize cookies

Choose which cookies this site may use. You can change this at any time from Cookie settings at the bottom of every page.