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 type | Extension | MIME type |
|---|---|---|
| Plain text | .txt | text/plain |
| HTML document | .html, .htm | text/html |
| CSS stylesheet | .css | text/css |
| JavaScript | .js, .mjs | text/javascript, application/javascript |
| JSON data | .json | application/json |
| XML document | .xml | application/xml, text/xml |
| Markdown | .md | text/markdown |
| CSV spreadsheet | .csv | text/csv |
| Rich Text Format | .rtf | application/rtf |
| PDF document | application/pdf | |
| Microsoft Word (legacy) | .doc | application/msword |
| Microsoft Word (Office Open XML) | .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| Microsoft Excel (legacy) | .xls | application/vnd.ms-excel |
| Microsoft Excel (Office Open XML) | .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
| Microsoft PowerPoint | .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation |
| OpenDocument Text | .odt | application/vnd.oasis.opendocument.text |
| OpenDocument Spreadsheet | .ods | application/vnd.oasis.opendocument.spreadsheet |
| EPUB ebook | .epub | application/epub+zip |
Image file types
| File type | Extension | MIME type |
|---|---|---|
| PNG image | .png | image/png |
| JPEG image | .jpg, .jpeg | image/jpeg |
| GIF image | .gif | image/gif |
| WebP image | .webp | image/webp |
| AVIF image | .avif | image/avif |
| SVG vector | .svg | image/svg+xml |
| TIFF image | .tif, .tiff | image/tiff |
| HEIC image (iOS) | .heic | image/heic |
| BMP image | .bmp | image/bmp |
| Windows Icon | .ico | image/vnd.microsoft.icon, image/x-icon |
Audio and video file types
| File type | Extension | MIME type |
|---|---|---|
| MP3 audio | .mp3 | audio/mpeg |
| WAV audio | .wav | audio/wav |
| OGG audio | .ogg, .oga | audio/ogg |
| FLAC audio | .flac | audio/flac |
| AAC audio | .aac, .m4a | audio/aac, audio/mp4 |
| WebM audio | .weba | audio/webm |
| MP4 video | .mp4 | video/mp4 |
| WebM video | .webm | video/webm |
| QuickTime video | .mov | video/quicktime |
| AVI video | .avi | video/x-msvideo |
| Matroska video | .mkv | video/x-matroska |
Archive and binary file types
| File type | Extension | MIME type |
|---|---|---|
| ZIP archive | .zip | application/zip |
| Gzip archive | .gz | application/gzip |
| Tarball | .tar | application/x-tar |
| 7-Zip archive | .7z | application/x-7z-compressed |
| RAR archive | .rar | application/vnd.rar |
| Binary / unknown | any | application/octet-stream |
| Web font (WOFF) | .woff | font/woff |
| Web font (WOFF2) | .woff2 | font/woff2 |
| TrueType font | .ttf | font/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.
| Source | MIME type |
|---|---|
| Google Docs | application/x-vnd.google-docs-document-slice-clip+wrapped |
| Google Sheets | application/x-vnd.google-docs-spreadsheet-slice-clip |
| Microsoft Office | application/x-officedraw, application/x-office-drawing |
| Figma | application/vnd.figma, application/x-figma-clipboard |
| URL list (drag-dropped links) | text/uri-list |
| Generic custom types | web 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.txttonotes.pdfchanges the extension but not the bytes. The MIME type staystext/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 astext/plain. Accept both in validation code.