DevToolsmith

MIME Type Lookup

Find the MIME type (Content-Type) for any file extension, or the extensions for a type. Drop a file to detect its real type from its first bytes, and compare it with what the extension and your browser claim.

Runs 100% in your browser — nothing is uploaded

Detect a file’s real type

Reads the file’s first bytes (its signature) in your browser and compares them with the extension and the type your browser reports. Nothing is uploaded.

Drop a file here, or

Common MIME types

Documents

Extension MIME type Format
.pdf application/pdf PDF document
.doc, .dot application/msword Word 97–2003 document
.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document Word document
.xls, .xlt application/vnd.ms-excel Excel 97–2003 workbook
.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Excel workbook
.ppt, .pps, .pot application/vnd.ms-powerpoint PowerPoint 97–2003 presentation
.pptx application/vnd.openxmlformats-officedocument.presentationml.presentation PowerPoint presentation
.odt application/vnd.oasis.opendocument.text OpenDocument text
.rtf application/rtf Rich Text Format
.epub application/epub+zip EPUB e-book

Data and text

Extension MIME type Format
.txt, .text, .log text/plain Plain text
.csv text/csv CSV
.tsv, .tab text/tab-separated-values TSV
.md, .markdown text/markdown Markdown
.json, .map application/json JSON
.ndjson, .jsonl application/x-ndjson JSON Lines (NDJSON)
.jsonld application/ld+json JSON-LD
.xml, .xsd, .xsl application/xml XML
.yaml, .yml application/yaml YAML
.geojson application/geo+json GeoJSON
.ics, .ifb text/calendar iCalendar
.sql application/sql SQL script

Web

Extension MIME type Format
.html, .htm text/html HTML
.css text/css CSS stylesheet
.js, .cjs text/javascript JavaScript
.mjs text/javascript JavaScript module
.svg, .svgz image/svg+xml SVG image
.wasm application/wasm WebAssembly module
.webmanifest application/manifest+json Web app manifest
.rss application/rss+xml RSS feed
.vtt text/vtt WebVTT subtitles

Images

Extension MIME type Format
.png image/png PNG image
.jpg, .jpeg, .jpe, .jfif image/jpeg JPEG image
.gif image/gif GIF image
.webp image/webp WebP image
.avif image/avif AVIF image
.heic, .heif image/heic HEIC image
.ico image/vnd.microsoft.icon ICO icon
.bmp, .dib image/bmp BMP image
.tiff, .tif image/tiff TIFF image

Audio

Extension MIME type Format
.mp3 audio/mpeg MP3 audio
.wav audio/wav WAV audio
.ogg, .oga, .opus audio/ogg Ogg audio
.m4a audio/mp4 M4A audio
.aac audio/aac AAC audio
.flac audio/flac FLAC audio

Video

Extension MIME type Format
.mp4, .m4v video/mp4 MP4 video
.webm video/webm WebM video
.mov, .qt video/quicktime QuickTime video
.avi video/x-msvideo AVI video
.mkv, .mka video/x-matroska Matroska video
.m3u8 application/vnd.apple.mpegurl HLS playlist
.ts video/mp2t MPEG transport stream

Fonts

Extension MIME type Format
.woff2 font/woff2 WOFF2 font
.woff font/woff WOFF font
.ttf font/ttf TrueType font
.otf font/otf OpenType font

Archives

Extension MIME type Format
.zip application/zip ZIP archive
.gz, .tgz application/gzip Gzip file
.tar application/x-tar Tar archive
.7z application/x-7z-compressed 7-Zip archive
.rar application/vnd.rar RAR archive

Programs and binaries

Extension MIME type Format
.bin application/octet-stream Binary data
.exe, .dll application/vnd.microsoft.portable-executable Windows executable
.apk application/vnd.android.package-archive Android package
.jar application/java-archive Java archive

Find a file’s type on the command line

# macOS and Linux: reads the content, like the detector above
file --mime-type report.pdf
# report.pdf: application/pdf

# What a server actually sends
curl -sI https://example.com/report.pdf | grep -i '^content-type'

Getting “Refused to apply style” or “Failed to load module script” errors? Those are MIME type problems: see .css and .js. For other response headers, look up the HTTP status codes.

Frequently asked questions

What is a MIME type?

A MIME type (or media type) is a label like text/html or image/png that says what kind of data a file or HTTP response contains. Servers send it in the Content-Type header, and browsers use it, not the file extension, to decide whether to show, play, run or download what they receive.

How do I find the MIME type of a file?

Type the extension into the lookup above, or drop the file on the detector. The detector reads the file’s first bytes, its signature, so it also catches files whose extension is wrong. On the command line, "file --mime-type name" does the same on macOS and Linux.

What is the difference between a MIME type and Content-Type?

The MIME type is the value, such as application/json. Content-Type is the HTTP (and email) header that carries it, optionally with parameters: Content-Type: text/html; charset=utf-8.

Why does my browser report an empty or wrong type for uploads?

File.type in the browser is guessed from the extension using the operating system’s list, so it is empty for unknown extensions and can differ between Windows, macOS and Linux (CSV files on Windows are often application/vnd.ms-excel). Never trust it for security; check the content on the server.

What does application/octet-stream mean?

It means “binary data of unknown type”. Browsers download such files instead of displaying them. Servers send it for extensions missing from their MIME table, which is why .mjs, .wasm or .webmanifest files sometimes fail to load.