HOME → GENERAL
GENERAL

File Extensions Explained: What .PDF, .DOCX, .XLSX, .ZIP and .EXE Actually Mean

Learn what .pdf, .docx, .xlsx, .zip and .exe files really are, which apps open them, and how to spot risky files before you click.

File Extensions Explained: What .PDF, .DOCX, .XLSX, .ZIP and .EXE Actually Mean
Someone sends you "Invoice_Final.pdf" on WhatsApp. You tap it. Nothing opens, or worse, something strange happens.
The name looked fine. The last few letters told the real story. That tail, the file extension, tells you what a file is and what it can do.

What is a file extension?

A file extension is the short code after the last dot in a file name.
In report.docx, the extension is .docx. It tells your computer which app should open the file. It also hints at what's inside.
Here's the catch. The extension is a label, not a guarantee. Anyone can rename a file. A file labelled .pdf may not be a PDF.

The five you'll meet most

PDF: the "looks the same everywhere" file

PDF stands for Portable Document Format. It keeps layout, fonts and images fixed across devices.
  • Best for: CVs, receipts, forms, contracts, anything you want to read, not edit.
  • Opens with: a browser, Adobe Reader, or your phone's built-in viewer.
  • Watch out: PDFs can contain links and, rarely, harmful content. Don't trust a PDF just because it opens.
  • DOCX: the Word document
DOCX: the Word document
DOCX is the modern Microsoft Word format. You can edit text, add tables and track changes.
  • Best for: letters, reports, assignments, drafts.
  • Opens with: Microsoft Word, Google Docs, LibreOffice (free).
  • Good to know: Older Word files use .doc. A .docm file can contain macros (small automated programs). Treat .docm with caution.
XLSX: the Excel spreadsheet
XLSX holds tables, formulas and charts in rows and columns.
  • Best for: budgets, lists, records, calculations.
  • Opens with: Microsoft Excel, Google Sheets, LibreOffice Calc (free).
  • Good to know: .xls is the older format. .xlsm can contain macros. .csv is a plain-text table with no formulas or formatting.
ZIP: the shrink-and-bundle box
A ZIP file packs one or more files into a single compressed file. It makes files smaller and easier to send.
  • Best for: sending many files together, saving space.
  • Opens with: built-in tools on Windows and Mac. 7-Zip (free) handles more types.
  • Watch out: A ZIP is a container. What's inside still matters. Look at the contents before you open anything.
Related formats: .rar and .7z do a similar job.
EXE: the program that runs
EXE means executable. Double-clicking it doesn't open a document. It runs code on your computer.
  • Best for: installing or running software.
  • Opens with: nothing. It runs itself.
  • Watch out: This is the riskiest of the five. Harmful software often arrives as an EXE.

Quick reference

file-extensions-explained-pdf-docx-xlsx-zip-exe

Other extensions worth knowing

  • jpg / .png: images. PNG handles sharp graphics and transparency well.
  • .mp3 / .mp4: audio and video.
  • .apk: an Android app installer. Install only from trusted sources.
  • .msi: a Windows installer. It runs code, so treat it like an EXE.
  • .bat, .cmd, .js, .vbs, .scr: script or program files. Be cautious with unexpected ones.
  • .txt: plain text. Almost no formatting, and very low risk.

Why you must see the full extension

Windows can hide extensions by default. That's how tricks work. A file named Invoice.pdf.exe may show up as Invoice.pdf. It looks like a document. It's a program.
Turn extensions on:
Windows 11:
  1. Open File Explorer.
  2. Click View, then Show.
  3. Tick File name extensions.
Windows 10:
  1. Open File Explorer.
  2. Click the View tab.
  3. Tick File name extensions.
Mac:
  1. Open Finder, then Settings.
  2. Click Advanced.
  3. Tick Show all filename extensions.
Menus vary a little by version, but the setting is always in File Explorer's or Finder's view options.

Does renaming change the file?

No.
Rename photo.jpg to photo.pdf and you have a JPG with a wrong label. Renaming doesn't convert anything. The app will likely fail to open it.
To convert properly, use Save As or Export in the right app. Or use a trusted converter.

What to do with a file you don't recognise

Run through this checklist before you open it.
  1. Check who sent it. Were you expecting it? Does the message make sense?
  2. Read the full file name. Look for double extensions like .pdf.exe.
  3. Check the file size. A "document" that is tiny or oddly huge deserves suspicion.
  4. Look at the file type. Right-click the file, then open Properties (Windows) or Get Info (Mac).
  5. Scan it. Use your antivirus. You can also upload it to a scanning service like VirusTotal. Don't upload private documents.
  6. Don't enable macros unless you trust the file and know why it needs them.
  7. When unsure, ask the sender through a different channel, such as a phone call.
Rule of thumb: Documents inform. Programs act. If a "document" wants permissions or an install, stop.

Key Takeaway

The extension tells you what a file is meant to do. PDF, DOCX and XLSX are documents. ZIP is a container. EXE is a program that runs.
Do this today: Turn on file name extensions on your computer. Then check your Downloads folder. Anything you don't recognise is worth a second look.