Stewdent.eu
▾

File Types

A file type (or file format) defines how data is organised and stored in a file. Different types are designed for different kinds of content, such as text, images, audio, and data tables.

Last updated: 3 January 2026

★☆☆☆☆ Level 1computingDatafile-typesfile formatsextensions5 min read

Report an error

Every file on a computer is just a sequence of bytes, but different files arrange those bytes in completely different ways. A file containing a photo and a file containing a spreadsheet are both stored as 0s and 1s — but the pattern of those bits follows a specific format that tells software how to interpret them.

File Extensions

A file extension is the short suffix after the dot in a filename. It signals to the operating system and to the user what format the file is in:

  • report.docx — a Word document
  • holiday.jpg — a JPEG image
  • song.mp3 — an MP3 audio file

The extension is not technically part of the data; it is a label. You could rename song.mp3 to song.txt, but the data inside does not change — it would still be audio data, and a text editor would show garbled nonsense.

Warning

Some operating systems hide file extensions by default. This is a security risk: malicious files can be named document.pdf.exe and appear to be a harmless PDF. Always configure your system to show extensions.

Common File Types by Category

Text Files

ExtensionFormatDescription
.txtPlain textSimple text, no formatting, universally readable
.docxWord documentRich text with formatting, images, tables
.pdfPDFFixed-layout document, looks the same everywhere
.csvComma-separated valuesTable data as plain text, one row per line
.htmlHTMLWeb page markup

Image Files

ExtensionFormatDescription
.jpg / .jpegJPEGCompressed photos — lossy compression
.pngPNGLossless compression — good for diagrams and screenshots
.gifGIFLimited to 256 colours; supports animation
.svgSVGVector graphics — scales to any size without pixelation
.bmpBitmapUncompressed images — large file sizes

Audio Files

ExtensionFormatDescription
.mp3MP3Compressed audio — lossy
.wavWAVUncompressed audio — large but high quality
.flacFLACLossless compressed audio
.aacAACCompressed audio used by Apple and streaming services

Video Files

ExtensionFormatDescription
.mp4MPEG-4Common compressed video format
.aviAVIOlder Microsoft container format
.movQuickTime MovieApple video format

Data and Code Files

ExtensionFormatDescription
.csvCSVData tables (rows and columns)
.jsonJSONStructured data used widely in web applications
.pyPython sourcePython programming language source code
.zipZIPCompressed archive containing multiple files
Note

A container format (like .mp4) is a wrapper that holds multiple types of data — for example, video, audio, and subtitles — inside a single file, each encoded in their own format.

Proprietary vs Open Formats

Some file formats are controlled by a single company (proprietary): .docx belongs to Microsoft, .psd to Adobe. Others are open standards that anyone can use and implement freely, like .png, .csv, and .svg.

Open formats are generally safer for long-term storage because they do not depend on a single company's software remaining available.

Tip

For sharing documents that must look identical on every device, use PDF. For data that will be imported into different programs, use CSV. For images on websites, use JPEG for photos and PNG for graphics with sharp edges or transparency.

Practice Problems

A student saves a photo as a .bmp file and another as a .jpg file at the same resolution. Which will have a larger file size, and why?

Show answer
The .bmp file will be larger because it stores uncompressed pixel data. The .jpg file uses lossy compression to reduce the file size.

Why is CSV a good choice for storing tabular data that needs to be used in different programs?

Show answer
CSV is plain text and an open format, so it can be read by almost any program — spreadsheet software, databases, programming languages, and text editors — without needing specialist software.