Every file on your computer ends with a short tag after a dot: .docx, .pdf, .jpg, .zip. That tag is called a file extension, and it tells your system what kind of file it is and which program should open it. Understanding extensions solves many everyday headaches, from “why won’t this open?” to “is this attachment safe?” This guide explains the basics in plain language.
What a file extension actually is
A file name has two parts: the name you choose and the extension that follows the last dot. In “budget.xlsx”, the name is “budget” and the extension is “xlsx”. The extension is a label. It hints at how the data inside the file is organized, so your operating system can pick a suitable program to open it.
It is important to understand that the extension does not change the contents of a file. It only describes them. If you rename a photo from “holiday.jpg” to “holiday.pdf”, the picture does not become a PDF. The file simply carries a misleading label, and most programs will either fail to open it or show an error.
Why extensions exist
Computers store everything as ones and zeros. A text document, a song and a spreadsheet all look the same at that level. What differs is the structure, the set of rules describing how those bits should be read. A format is that set of rules, and the extension is the name tag that points to it. When you double-click a file, the system checks the extension, finds the program associated with it, and sends the file there.
Common extensions and what they are for
Hundreds of extensions exist, but a small group covers most of daily life. The table below groups the ones you are most likely to meet.
| Type | Extension | What it is |
|---|---|---|
| Documents | .docx | Word-processing document, editable |
| Documents | Fixed-layout document, designed to look the same on any device | |
| Documents | .txt | Plain text with no formatting |
| Spreadsheets | .xlsx, .csv | Spreadsheet workbook; CSV is plain text with values separated by commas |
| Images | .jpg, .png, .gif | Common picture formats with different compression and transparency features |
| Audio | .mp3, .wav | Compressed and uncompressed sound |
| Video | .mp4, .mov | Common video containers |
| Archives | .zip, .rar | Bundles of files, often compressed |
| Programs | .exe, .msi, .app | Software that runs on your system |
Choosing between similar formats
Some extensions do similar jobs but suit different purposes. Knowing the difference helps you pick the right one.
- JPG vs PNG: JPG compresses photos into small files but loses a little quality each time it is saved. PNG keeps sharp edges and supports transparency, which makes it better for logos, screenshots and graphics with text.
- DOCX vs PDF: use DOCX while a document is still being edited. Use PDF when you want to share a final version that keeps its layout.
- MP3 vs WAV: MP3 is compressed, so files are small and easy to share. WAV keeps full audio detail but takes much more space.
- ZIP: useful for sending many files at once or reducing size, but you must extract it before using what is inside.
Why a file might not open
When a file refuses to open, the extension is often the first clue. The most common causes are straightforward:
- No installed program supports the format. Installing a compatible app, or opening the file in a free online viewer, often solves it.
- The file was renamed with the wrong extension, so the system uses the wrong program.
- The file is damaged, for example after an interrupted download.
- The file comes from a newer version of a program than the one you have.
If you suspect a wrong extension, you can look up what the file really is by checking its properties or asking the sender which program created it. Avoid guessing by changing extensions at random, since that rarely fixes anything and can make it harder to recover the file.
How to see extensions on your computer
Many systems hide extensions by default to keep names tidy. That is convenient but also risky, because you cannot see what you are about to open. In Windows File Explorer, open the View menu and turn on the option to show file name extensions. On a Mac, open Finder settings, go to the Advanced tab and enable the option to show all filename extensions. After that, every file name will end with its real extension.
Spotting risky files
Extensions also matter for security. Some formats can run code, and attackers sometimes disguise harmful files as harmless ones. A classic trick is a double extension, such as “invoice.pdf.exe”. With extensions hidden, it appears as “invoice.pdf”, but the real format is an executable program.
Be especially careful with unexpected attachments ending in .exe, .scr, .bat, .js or .msi, and with compressed archives from senders you do not know. Documents can also contain macros, small scripts that automate tasks, so treat files from unknown sources with caution and keep your security software up to date. When in doubt, confirm with the sender through a different channel before opening anything.
Converting between formats
If you need a different format, do not simply rename the file. Use a proper conversion: open the document in the program that created it and choose “Save as” or “Export”, then pick the new format. Many apps can export to PDF, and image editors can save a picture as JPG or PNG. This rewrites the contents in the correct structure, rather than just changing the label.
Conclusion
File extensions are small, but they carry big information: they tell your computer how to read a file and help you decide what is safe to open. Showing extensions, choosing formats that match your goal, and converting files properly will save time and prevent mistakes.
If you want to build solid foundations in computing, explore the beginner-friendly IT courses available on Cursa, where you can go further with files, software and everyday digital skills.















