Reference
File types, explained
What each format is, how it works and the quirks worth knowing, with free sample files to download for testing.
Web & code
Pages, stylesheets, scripts and structured data
CSS file
.css · text/css
A CSS file is a plain-text stylesheet that tells a browser how to display a web page: colours, fonts, spacing and layout. This guide explains what's inside one, how browsers decide which rule wins, the quirks worth knowing, and has free sample CSS files to download for testing.
Read the explainerHTML file
.html, .htm · text/html
An HTML file is a plain-text document that a web browser turns into a web page. This guide explains what's inside one, how browsers read it, the quirks worth knowing, and has free sample HTML files to download for testing.
Read the explainerJavaScript file
.js, .mjs · text/javascript
A JavaScript file is a plain-text program that runs in a web browser, or on a server with Node.js. This guide explains what's inside one, the difference between scripts and modules, the errors worth knowing, and has free sample JavaScript files to download for testing.
Read the explainerJSON file
.json · application/json
A JSON file is a plain-text file that stores structured data as objects, lists, text and numbers, in a form both people and programs can read. This guide explains the syntax, the mistakes that stop a file from parsing, the quirks worth knowing, and has free sample JSON files to download for testing.
Read the explainerMarkdown file
.md · text/markdown
A Markdown file is a plain-text document that uses simple symbols, like
Read the explainer#for a heading and**for bold, which a renderer turns into formatted text. This guide explains what's inside one, how it becomes HTML, the quirks of its many flavours, and has free sample Markdown files to download for testing.TXT file
.txt · text/plain
A TXT file is a plain-text file: characters and line breaks, with no formatting at all. This guide explains what's inside one, how encodings and line endings work, the quirks worth knowing, and has free sample TXT files to download for testing.
Read the explainerXML file
.xml · application/xml
An XML file is a plain-text file that stores data and documents inside tags you define yourself, following strict rules that any XML parser can check. This guide explains what's inside one, how parsers read it, the formats built on it and its security pitfalls, and has free sample XML files to download for testing.
Read the explainer
Documents
Reports, contracts, letters and notes
DOCX file
.docx · application/vnd.openxmlformats-officedocument.wordprocessingml.document
A DOCX file is a Microsoft Word document: a ZIP package of XML files holding the text, formatting, images and settings. This guide explains what's inside one, how it differs from DOC and PDF, the quirks worth knowing, and has free sample DOCX files to download for testing.
Read the explainerPDF file
.pdf · application/pdf
A PDF file is a document that looks the same on every screen and printer, with its fonts, images and layout fixed in place. This guide explains what's inside one, how readers open it, the quirks worth knowing, and has free sample PDF files to download for testing.
Read the explainer
Spreadsheets & data
Tables, exports and datasets
CSV file
.csv · text/csv
A CSV file is a plain-text table: one record per line, with the fields separated by commas. This guide explains the quoting rules, why spreadsheets so often change what's inside, how CSV compares with XLSX and JSON, and has free sample CSV files to download for testing.
Read the explainerXLSX file
.xlsx · application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
An XLSX file is an Excel workbook: a ZIP archive of XML files that holds sheets, formulas, formatting and charts. This guide explains what's inside one, how it stores numbers and dates, how it differs from XLS, XLSM and CSV, and has free sample XLSX files to download for testing.
Read the explainer
Images
Photos, screenshots, diagrams and artwork
GIF file
.gif · image/gif
A GIF file is an image with at most 256 colours per frame that can hold several frames, which is why it became the web's format for short looping animations. This guide explains what's inside one, how animation and transparency work, and has free sample GIF files to download for testing.
Read the explainerICO file
.ico · image/vnd.microsoft.icon
An ICO file is a small container that holds the same icon at several sizes, used for Windows program icons and website favicons. This guide explains what's inside one, how apps pick a size, the favicon quirks worth knowing, and has free sample ICO files to download for testing.
Read the explainerJPEG file
.jpg, .jpeg, .jpe · image/jpeg
A JPEG file is a compressed photo: it throws away detail your eye is unlikely to miss, so pictures take a fraction of the space. This guide explains what's inside one, how the compression works, the quirks worth knowing, and has free sample JPG files to download for testing.
Read the explainerPNG file
.png · image/png
A PNG file is a lossless image: every pixel comes back exactly as it was saved, transparency included. This guide explains what's inside one, when PNG is the right choice and when it isn't, and has free sample PNG files to download for testing.
Read the explainerSVG file
.svg · image/svg+xml
An SVG file is a text file that describes an image as shapes, so it stays sharp at any size. This guide explains what's inside one, how browsers draw it, the quirks and security issues worth knowing, and has free sample SVG files to download for testing.
Read the explainerWebP file
.webp · image/webp
A WebP file is an image format from Google that can be lossy like JPEG or lossless like PNG, with transparency and animation, usually in a smaller file. This guide explains what's inside one, how it compares with the formats it replaces, and has free sample WebP files to download for testing.
Read the explainer
Video
Clips, screen recordings and exports
Audio
Music, voice notes and podcast files
MP3 file
.mp3 · audio/mpeg
An MP3 file is compressed audio that leaves out sounds you're unlikely to hear, making it about a tenth the size of a CD-quality recording. This guide explains what's inside one, how tags and bit rates work, the quirks worth knowing, and has free sample MP3 files to download for testing.
Read the explainerWAV file
.wav · audio/wav
A WAV file is a recording stored as raw, usually uncompressed samples, the format audio software works with before anything is compressed. This guide explains what's inside one, how its chunks fit together, the quirks worth knowing, and has free sample WAV files to download for testing.
Read the explainer
Archives
Bundles of files kept together