← Guides

File Types & MIME Types: The Complete Reference

When your browser, email client, or operating system handles a file, it does not look at the extension — it looks at the MIME type. The list below covers the types of files you are most likely to encounter on the web and on the clipboard: documents, images, audio, video, archives, code, and the application-specific formats produced by Office, Google Docs, Figma, and the other tools your users copy from.

If you need to see the exact MIME types a specific file or clipboard payload is reporting right now, drag it onto the Clipboard Inspector and every type is listed with the raw bytes beneath it.

Text and document file types

File typeExtensionMIME type
Plain text.txttext/plain
HTML document.html, .htmtext/html
CSS stylesheet.csstext/css
JavaScript.js, .mjstext/javascript, application/javascript
JSON data.jsonapplication/json
XML document.xmlapplication/xml, text/xml
Markdown.mdtext/markdown
CSV spreadsheet.csvtext/csv
Rich Text Format.rtfapplication/rtf
PDF document.pdfapplication/pdf
Microsoft Word (legacy).docapplication/msword
Microsoft Word (Office Open XML).docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
Microsoft Excel (legacy).xlsapplication/vnd.ms-excel
Microsoft Excel (Office Open XML).xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Microsoft PowerPoint.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentation
OpenDocument Text.odtapplication/vnd.oasis.opendocument.text
OpenDocument Spreadsheet.odsapplication/vnd.oasis.opendocument.spreadsheet
EPUB ebook.epubapplication/epub+zip

Image file types

File typeExtensionMIME type
PNG image.pngimage/png
JPEG image.jpg, .jpegimage/jpeg
GIF image.gifimage/gif
WebP image.webpimage/webp
AVIF image.avifimage/avif
SVG vector.svgimage/svg+xml
TIFF image.tif, .tiffimage/tiff
HEIC image (iOS).heicimage/heic
BMP image.bmpimage/bmp
Windows Icon.icoimage/vnd.microsoft.icon, image/x-icon

Audio and video file types

File typeExtensionMIME type
MP3 audio.mp3audio/mpeg
WAV audio.wavaudio/wav
OGG audio.ogg, .ogaaudio/ogg
FLAC audio.flacaudio/flac
AAC audio.aac, .m4aaudio/aac, audio/mp4
WebM audio.webaaudio/webm
MP4 video.mp4video/mp4
WebM video.webmvideo/webm
QuickTime video.movvideo/quicktime
AVI video.avivideo/x-msvideo
Matroska video.mkvvideo/x-matroska

Archive and binary file types

File typeExtensionMIME type
ZIP archive.zipapplication/zip
Gzip archive.gzapplication/gzip
Tarball.tarapplication/x-tar
7-Zip archive.7zapplication/x-7z-compressed
RAR archive.rarapplication/vnd.rar
Binary / unknownanyapplication/octet-stream
Web font (WOFF).wofffont/woff
Web font (WOFF2).woff2font/woff2
TrueType font.ttffont/ttf

Clipboard-specific MIME types

When users copy from rich-text applications, the clipboard often carries proprietary MIME types in addition to the generic ones above. These let the source application round-trip a copy-paste without losing formatting, but they are irrelevant — and often hostile — to generic paste handlers.

SourceMIME type
Google Docsapplication/x-vnd.google-docs-document-slice-clip+wrapped
Google Sheetsapplication/x-vnd.google-docs-spreadsheet-slice-clip
Microsoft Officeapplication/x-officedraw, application/x-office-drawing
Figmaapplication/vnd.figma, application/x-figma-clipboard
URL list (drag-dropped links)text/uri-list
Generic custom typesweb application/*

How to check the type of a file or clipboard entry

Browsers never trust a file extension on their own — they sniff the first few bytes (the "magic number") and cross-check against the MIME type the OS reports. For uploads from an <input type="file">, read file.type. For drag and drop, iterate event.dataTransfer.items and read each item.type. For clipboard pastes, read event.clipboardData.types or the async Clipboard API's ClipboardItem.types.

The simplest way to verify what a real file is reporting: open Clipboard Inspector, drop the file, and read the MIME type from the results panel. For a deeper dive into how clipboard types behave across applications, see Clipboard MIME Types Explained.

Why file types and MIME types sometimes disagree

A file named report.pdf is not necessarily a PDF. Extensions are advisory; MIME types declared by the OS or the server are authoritative for most purposes, and magic-number sniffing is the final source of truth. Three common mismatches:

  • Renamed files. A user renaming notes.txt to notes.pdf changes the extension but not the bytes. The MIME type stays text/plain.
  • Server misconfiguration. Static hosts sometimes serve all files as application/octet-stream. Browsers then download instead of displaying them.
  • Old browsers and weird encodings. Some CSV exports arrive as application/vnd.ms-excel; some Markdown files arrive as text/plain. Accept both in validation code.