Skip to main content

Section 1.2 File Extensions

There are many different types of files. At the very basics, we have images, videos, documents, and songs, but there are so many more. Even within each of those categories, there are numerous types. You may be familiar with a PDF and a Word Document. Both of those could be classified as “documents”, but are interacted with very differently. Whether you are an advanced computer programmer or someone who uses a computer for every-day purposes, an understanding of file extensions is essential. File extensions help us understand what type of file we are working with and give us an idea of how we can interact with that file. The following chunks give common (and some not so common) extensions for various categories. Refer back to this section often, especially if you find yourself forgetting what a file is.
Hint: Control + F or Command + F work well on this page.

Subsection 1.2.1 Images

Why would we need more than on extension for an image? A photo is a photo, right? Wrong. Each of the file extensions have unique aspects and features. For instance, the Apple .heic file often takes up less storage space. However, not all programs can open them. The University of Michigan 19  and Kinsta 20  have great guides on the differences between some image file extensions. The table here just lists the extensions and what they are, not the details on their use.
Table 1.2.1.1. Image File Extensions
Extension File Type
.jpg or .jpeg Joint Photographic Experts Groups image
.png Portable Network Graphics image
.svg Scalable Vector Graphics image
.gif A looped image/video blend
.eps Encapsulated PostScript (vector) image
.bmp Bitmap image
.tif or .tiff Tagged Image File Format
.raw Raw image (usually from a camera)
.HEIF High Efficiency Image File
.HEIC High Efficiency Image Container (Apple)
.psd Adobe Photoshop
.ai Adobe Illustrator

Subsection 1.2.2 Videos

Adobe 21  has a great guide on the differences between some video file extensions. The table here just lists the extensions and what they are, not the details on their use.
Table 1.2.2.1. Video File Extensions
Extension File Type
.mp4 MPEG-4
.mov QuickTime Movie
.wmv Windows Media Viewer
.avi Audio Video Interleave
.prproj Adobe Premiere Pro Project
.aep Adobe After Effect Project
.fcp Apple Final Cut Project
.camproj Camtasia Project
.m4v iTunes Movie File

Subsection 1.2.3 Documents

There are many different file extensions that refer to documents. Many of them you will never encounter. Only the main file types are listed here. File Stack 22  has a good explanation on some of the file types here.
Extension File Type
.doc or .docx Microsoft Word Document
.xsl or .xslx Microsoft Excel Spreadsheet
.ppt or .pptx Microsoft PowerPoint Presentation
.pages Apple Document
.key Apple Keynote Presentation
.numbers Apple Numbers Spreadsheet
.pdf Adobe Portable Document Format
.rtf Rich Text Format Document
.txt Plain Text Document
.log Text Log File (often records messages)
.md MarkDown Document
.Rmd MarkDown Document for use in R
Note: technically, .html and .xml are considered document-type files. I am choosing to place them under coding-type files instead.

Subsection 1.2.4 Audio

makeuseof.com 23  has great descriptions of the most common audio file types.
Extension File Type
.mp3 MPEG Layer 3 (lossy compression)
.wav Waveform Audio Format (uncompressed)
.aiff Audio Interchange File Format (uncompressed)
.aac Advanced Audio Coding (lossy compression)
.wma Windows Media Audio (lossy compression)
.flac Free Lossless Audio Codec (lossless compression)
.aa or .aax Audible Audio File
.m4a Audio-Only MPEG-4 (iTunes)
.midi MIDI File

Subsection 1.2.5 Coding and Programming

There is a plethora of programming languages, software, and interfaces and each of them uses a different file extension.
Extension File Type
.R R Script
.py Python Script
.ipynb Jupyter Notebook
.html HyperText Markup Language
.css Cascading Style Sheets
.js Javascript
.sas SAS Script
.xml eXtensible Markup Language
.xslt eXtensible Style Sheet Transformations
.ptx PreTeXt Markup File
.tex LaTeX Document (typically for mathematics)
.c C and C++ File
.cpp C++ File
.java Java Source
.swift Swift Code File
.vb Visual Basic File
.vbs Visual Basic Script

Subsection 1.2.6 Data

Many of these extensions also belong in Subsection 1.2.3 but are related enough to merit another subsection.
Extension File Type
.csv Comma Separated Values
.tsv or .tab Tab Separated Values
.json JavaScript Object Notation
.csv Comma Separated Values
.tsv Tab Separated Values
.rds Single R Object
.RData Multiple R Objects
.sas7bdat SAS Data File

Subsection 1.2.7 Other File Exensions

Extension File Type
.band Apple GarageBand File
.logicx Apple Logic Pro File
.exe Windows Executable File
.zip Compressed Files
.tar.gz Collection of (archived) files
.app Mac Application
.dmg Mac Disc Image (executable file)
.pkg Package of Software or Files
.otf Open Type Font
.ttf TrueType Font