filesdataFormats and data

A practical reference

Beyond the
file extension.

Formats, hashes, metadata and compression. Understand what a file contains, what you can change and what to check before sharing.

Three file layers: name and extension, content bytes, and metadata
The name is a hint. The contents need checking. Original diagram, CC0.

Format index

Search by extension, name or purpose. This is a guide to choosing, not a file-safety test.

All formats: 18

TXT

Text and data

Plain text. Notes, instructions and short lists. No hidden formatting; easy to compare line by line.

Specify the encoding. UTF-8 is usually convenient for exchange; line endings can vary.

Extension
.txt
Common MIME type
text/plain
How the format works

CSV

Tables

Tabular data. Exchange rows and columns between spreadsheets and programs. Values are stored as text.

Workbook formulas, types and layout are not retained. Choose the delimiter and encoding on import.

Extension
.csv
Common MIME type
text/csv
How the format works

JSON

Text and data

Structured data. Objects, arrays, strings, numbers, true, false and null. Useful for configuration and data exchange.

Keys are double-quoted strings. Comments and trailing commas are not part of standard JSON.

Extension
.json
Common MIME type
application/json
How the format works

XML

Text and data

Marked-up data. Nested elements and attributes describe a structure. A schema or convention determines its meaning.

Disable external entities and network access when parsing untrusted data.

Extension
.xml
Common MIME type
application/xml
How the format works

PDF

Documents

Fixed-page document. Share a document with fixed page layout. Text may be selectable or part of a scanned image.

PDF alone does not guarantee accessibility or preservation. Check fonts, text and the required profile.

Extension
.pdf
Common MIME type
application/pdf
How the format works

DOCX

Documents

Editable document. Text, styles, images and document structure in an Office Open XML package. Useful for collaborative editing.

Layout depends on fonts and software. Review comments, tracked changes and properties before sharing.

Extension
.docx
Common MIME type
application/vnd.openxmlformats-officedocument.wordprocessingml.document
How the format works

PNG

Images

Lossless raster. Screenshots, diagrams and graphics with sharp edges. Supports transparency.

Often larger than JPEG or WebP for photographs. Size optimisation is not the same as metadata removal.

Extension
.png
Common MIME type
image/png
How the format works

JPEG

Images

Photographic raster. Compact photographs and smooth colour transitions. Usually uses lossy compression.

No conventional alpha channel. Repeated lossy saves can accumulate artefacts.

Extension
.jpg, .jpeg
Common MIME type
image/jpeg
How the format works

SVG

Images

Vector graphics. Lines, paths and text in XML. Diagram and icon outlines can scale without becoming pixelated.

May contain scripts, links and embedded rasters. Do not treat an untrusted SVG as trusted inline code.

Extension
.svg
Common MIME type
image/svg+xml
How the format works

WebP

Images

Web raster. Supports lossy and lossless modes, transparency and animation. Useful for website images.

Size and quality depend on mode and content. Keep the source separate from the web export.

Extension
.webp
Common MIME type
image/webp
How the format works

ZIP

Archives

File collection. Collects multiple files with paths; entries can be compressed individually. Convenient for small packs.

Not every ZIP is encrypted. Inspect the file list and expanded size before extracting an unfamiliar archive.

Extension
.zip
Common MIME type
application/zip
How the format works

TAR

Archives

Archive, not necessarily compressed. Combines files and some attributes in one stream. Often used for directories and backup collections.

TAR itself generally does not compress data. A .tar.gz suffix means a TAR stream compressed with gzip.

Extension
.tar
Common MIME type
application/x-tar
How the format works

GZIP

Archives

Compressed stream. Lossless compression of one data stream. Often applied to text logs and TAR archives.

Not a directory structure by itself. A collection needs an archive container such as TAR first.

Extension
.gz
Common MIME type
application/gzip
How the format works

7Z

Archives

Compressed archive. A container supporting different compression and encryption methods. Can compress similar text files well.

Support depends on software. Extracting one entry from a solid archive can require processing a large block.

Extension
.7z
Common MIME type
application/x-7z-compressed
How the format works

MP3

Audio and video

Lossy audio. A widely used compressed audio format. Suitable for distributing speech and music.

Discarded detail cannot be recovered. Re-encoding from another lossy format can reduce quality further.

Extension
.mp3
Common MIME type
audio/mpeg
How the format works

WAV

Audio and video

Audio container. Often contains uncompressed PCM audio and is useful as a working file. Other codecs are possible.

The extension does not prove the audio is uncompressed. Check codec, sample rate and channel count.

Extension
.wav
Common MIME type
audio/wav
How the format works

MP4

Audio and video

Media container. Stores video, audio and other tracks. H.264 is one common video codec carried in MP4.

Compatibility depends on the codec, profile and device, not just the extension.

Extension
.mp4
Common MIME type
video/mp4
How the format works

WebM

Audio and video

Web media container. A web video and audio container, commonly carrying VP8, VP9 or AV1 video and Opus or Vorbis audio.

Check the actual codec and support on target devices. Changing the extension does not convert video.

Extension
.webm
Common MIME type
video/webm
How the format works

More than an extension

Four guides for the moments when you need to understand the contents, not just choose an application.

Using this reference

Short cards give an overview. The articles explain limits and common mistakes.

Cards describe common uses of each format. A particular file may use a different profile, codec or packaging method. MIME labels and extensions do not prove what is inside. This site does not receive or analyse your files: search only filters the reference text on this page.

Original text and diagrams are available under CC0 1.0 without required attribution. Specification links lead to external material with its own terms. This reference does not replace documentation for a particular application. Licence · CC0 1.0