Free Guide to Understanding File Extensions
What Are File Extensions and Why They Matter A file extension is a short code at the end of a file name that tells your computer what kind of file it is and...
What Are File Extensions and Why They Matter
A file extension is a short code at the end of a file name that tells your computer what kind of file it is and what program should open it. Every file on your computer has an extension, even if you can't always see it. For example, a document might be named "resume.docx" where ".docx" is the extension. An image might be "vacation.jpg" where ".jpg" is the extension. The extension comes after the final period in a file name and is usually two to four letters long.
File extensions work like labels in a filing system. When you double-click a file, your computer looks at the extension and says, "This is a .docx file, so I should open it with Microsoft Word" or "This is a .jpg file, so I should open it with an image viewer." Without extensions, your computer wouldn't know which program to use, and the file wouldn't open correctly.
Understanding file extensions matters for several practical reasons. First, it helps you organize your files better. If you know what extension a file has, you understand what it contains. Second, it helps you avoid problems. Some file extensions, like .exe or .scr, can contain computer viruses if they come from untrusted sources. Third, it helps you work with different programs. If you need to send a file to someone using a different computer system, knowing about file extensions helps you convert it to a format they can read.
On Windows computers, file extensions are often hidden by default. You can turn on the view to see them. On Apple computers running macOS, extensions are also often hidden. On phones and tablets, extensions rarely appear, but the files still have them behind the scenes. Learning about extensions helps you understand how your computer organizes information and protects itself from problems.
Practical Takeaway: Check your computer's settings to show file extensions. This single change helps you see exactly what type of file you're working with and makes it easier to spot problems or suspicious files.
Common File Extensions for Documents and Text
Document files store written information and come in many different formats. The most common document extension today is .docx, which stands for "Office Open XML Document." This is the standard format for Microsoft Word, one of the most popular word-processing programs in the world. When you save a document in Word without choosing a different format, it automatically becomes a .docx file. Many other programs can also open .docx files, including Google Docs, LibreOffice, and Apple Pages.
Another document format is .pdf, which stands for "Portable Document Format." PDF files look the same on any computer, any phone, and any device. A .pdf file created on a Windows computer looks identical when opened on a Mac or on a phone. This is why PDFs are used for official documents like contracts, government forms, and receipts. Adobe created the PDF format, but you don't need to pay for software to read PDF files—many free programs and all web browsers can open them.
Older document formats include .doc (the older Microsoft Word format) and .txt (plain text files). A .txt file contains only text with no formatting like bold or italics. .txt files open in any program on any device, making them universal but less fancy than .docx or .pdf. Some people still use .doc files on older computers, though Microsoft and most programs now prefer .docx.
Other document-related extensions include .xlsx (Excel spreadsheets used for numbers and data), .pptx (PowerPoint presentations), and .odt (OpenDocument Text, used by open-source programs). Older versions of these Microsoft programs used extensions like .xls, .ppt, and .doc. The newer versions with the "x" at the end (.xlsx, .pptx, .docx) are based on modern standards and usually work better with different programs.
When you need to send a document to someone, consider which format works best. If you want them to see it exactly as you created it, use .pdf. If they need to edit the document, send .docx or .txt. If the file contains mostly numbers or data, .xlsx is standard. Understanding these extensions helps you choose the right format for your needs.
Practical Takeaway: When saving important documents, use .pdf for files you don't want changed and .docx for files others might need to edit. Always keep a backup in a different location in case something happens to the original.
Image and Photo File Extensions Explained
Image files store pictures and graphics. The three most common image extensions are .jpg (or .jpeg), .png, and .gif. Each format works differently and has different strengths. Understanding which format to use makes a big difference in image quality, file size, and where you can use the image.
.jpg files, which stand for "Joint Photographic Experts Group," are the standard format for photographs. Almost every digital camera, phone camera, and social media platform uses .jpg for photos. A .jpg file can hold millions of colors, making it perfect for realistic photos with lots of detail and color variation. The .jpg format also shrinks file sizes significantly without losing too much visual quality—a photo that might be 50 megabytes in another format could be just 2-3 megabytes as a .jpg. However, .jpg uses what's called "lossy compression," meaning some information is thrown away to make the file smaller. If you zoom in very close to a .jpg image, you might see small blocks or blurriness where the computer simplified the image to save space.
.png files, which stand for "Portable Network Graphic," are better for images that need to be clear and precise. .png files support what's called "lossless compression," which means no information is lost when the file is made smaller. .png files also support transparency, meaning parts of the image can be see-through. This makes .png perfect for logos, icons, and graphics where sharp edges matter. However, .png files are usually larger than .jpg files. A logo saved as .png might be 500 kilobytes while the same logo as .jpg might be 100 kilobytes.
.gif files, which stand for "Graphics Interchange Format," are older but still widely used. A .gif file can store multiple images in sequence, which means it can show animation—these are the moving pictures you see on social media. .gif files support transparency and work well for simple graphics with solid colors and sharp edges. .gif files are small, but they only support 256 colors, so they don't work well for photographs. Today, most new animated images use .mp4 or .webp formats instead, though .gif remains popular.
Newer formats include .webp (developed by Google for smaller file sizes while keeping quality), .svg (a format for drawings that can scale to any size without getting blurry), and .heic (used on iPhones for better quality at smaller file sizes). When you're working with images, choose the format based on what you're doing: .jpg for photos, .png for graphics and images that need transparent areas, and .gif for simple animations.
Practical Takeaway: Save photographs as .jpg to keep file sizes manageable. Save logos, icons, and graphics that need sharp edges as .png. If you're unsure, .png works for almost everything, though it will take up more space on your device.
Video and Audio File Extensions
Video and audio files store moving pictures with sound or just sound by itself. These files tend to be much larger than document or image files because they store information for every frame (still picture) in the video, often at 24 or 30 frames per second. Understanding video and audio extensions helps you know which programs can play your files and how much storage space you'll need.
The most common video extensions today are .mp4, .avi, .mov, and .mkv. .mp4 files (MPEG-4 video) work on almost every device and are the standard for online videos. YouTube videos, streaming services, and most videos you download or create on your phone are .mp4 format. An .mp4 file usually contains the video compressed using a method called H.264, and the audio compressed separately. A .mp4 file works on Windows computers, Macs, phones, and tablets. Most web browsers can play .mp4 files directly without needing extra software.
.avi files (Audio Video Interleave) are older video files that were common on Windows computers years ago. Many .avi files are quite large—a 10
Related Guides
More guides on the way
Browse our full collection of free guides on topics that matter.
Browse All Guides →