MIME Type Lookup
Look up MIME types by file extension or search by type.
Reviewed by Aygul Dovletova · Last reviewed
| Extension | MIME Type | |
|---|---|---|
.json | application/json | |
.xml | application/xml | |
.pdf | application/pdf | |
.zip | application/zip | |
.gz | application/gzip | |
.tar | application/x-tar | |
.7z | application/x-7z-compressed | |
.rar | application/vnd.rar | |
.bz2 | application/x-bzip2 | |
.xz | application/x-xz | |
.doc | application/msword | |
.docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | |
.xls | application/vnd.ms-excel | |
.xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | |
.ppt | application/vnd.ms-powerpoint | |
.pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | |
.odt | application/vnd.oasis.opendocument.text | |
.ods | application/vnd.oasis.opendocument.spreadsheet | |
.odp | application/vnd.oasis.opendocument.presentation | |
.js | application/javascript | |
.mjs | application/javascript | |
.wasm | application/wasm | |
.bin | application/octet-stream | |
.exe | application/vnd.microsoft.portable-executable | |
.dmg | application/x-apple-diskimage | |
.deb | application/vnd.debian.binary-package | |
.rpm | application/x-rpm | |
.swf | application/x-shockwave-flash | |
.rtf | application/rtf | |
.jar | application/java-archive | |
.epub | application/epub+zip | |
.mpkg | application/vnd.apple.installer+xml | |
.ogx | application/ogg | |
.atom | application/atom+xml | |
.rss | application/rss+xml | |
.xhtml | application/xhtml+xml | |
.sql | application/sql | |
.graphql | application/graphql | |
.jsonld | application/ld+json | |
.mp3 | audio/mpeg | |
.wav | audio/wav | |
.ogg | audio/ogg | |
.flac | audio/flac | |
.aac | audio/aac | |
.m4a | audio/mp4 | |
.weba | audio/webm | |
.opus | audio/opus | |
.mid | audio/midi | |
.midi | audio/midi | |
.wma | audio/x-ms-wma | |
.aiff | audio/aiff | |
.ra | audio/x-realaudio | |
.png | image/png | |
.jpg | image/jpeg | |
.jpeg | image/jpeg | |
.gif | image/gif | |
.webp | image/webp | |
.avif | image/avif | |
.svg | image/svg+xml | |
.ico | image/x-icon | |
.bmp | image/bmp | |
.tiff | image/tiff | |
.tif | image/tiff | |
.heic | image/heic | |
.heif | image/heif | |
.jxl | image/jxl | |
.apng | image/apng | |
.psd | image/vnd.adobe.photoshop | |
.cur | image/x-icon | |
.raw | image/x-raw | |
.html | text/html | |
.htm | text/html | |
.css | text/css | |
.csv | text/csv | |
.txt | text/plain | |
.md | text/markdown | |
.yaml | text/yaml | |
.yml | text/yaml | |
.ics | text/calendar | |
.vcf | text/vcard | |
.tsv | text/tab-separated-values | |
.log | text/plain | |
.ini | text/plain | |
.conf | text/plain | |
.mp4 | video/mp4 | |
.webm | video/webm | |
.ogv | video/ogg | |
.avi | video/x-msvideo | |
.mov | video/quicktime | |
.mkv | video/x-matroska | |
.wmv | video/x-ms-wmv | |
.flv | video/x-flv | |
.ts | video/mp2t | |
.m4v | video/x-m4v | |
.3gp | video/3gpp | |
.woff | font/woff | |
.woff2 | font/woff2 | |
.ttf | font/ttf | |
.otf | font/otf | |
.eot | application/vnd.ms-fontobject | |
.ics | application/ics |
How to Use the MIME Type Lookup
- Type in the search box to filter the MIME database. Search matches against the extension (
.pdf,pdf), the MIME type (application/pdf), or descriptive keywords (portable document). - Use the category pills - Application, Audio, Image, Text, Video, Font - to narrow the list to one top-level type.
- Click a row to copy the MIME string to your clipboard in one click. An inline confirmation appears so you know it worked.
- Scan the extensions column to see all file extensions commonly mapped to a given type (for example
.jpgand.jpegboth map toimage/jpeg). - Reach the reference anywhere - the entire dataset ships with the page and filter runs client-side, so it still works offline after first load.
How the Lookup Works
The table is generated from a curated JSON array combining the IANA Media Types registry, the Nginx mime.types file shipped with the server, the Apache httpd mime.types file, and a handful of community-tracked formats (AVIF, HEIC, WebP, opus). Every row is annotated with whether the format is a Structured Syntax Suffix (like +json, +xml, +zip) and whether it is a standards-track IANA assignment or a vendor tree entry. The filter uses a simple case-insensitive substring match over all fields, so a search like json surfaces application/json, application/ld+json, application/manifest+json, and half a dozen others. Everything runs in the browser via plain JavaScript array methods; there is no backend lookup, no external CDN fetch, and no analytics keystroke capture.
When You Would Use This Lookup
- Setting the
Content-Typeheader correctly on an S3 or R2 upload - the defaultapplication/octet-streamcauses browsers to download instead of displaying inline. - Configuring
nginx,httpd, or Caddymime.typesentries for a new file format your users are uploading. - Writing an
accept=attribute on a file-input element - the MIME type restricts what the file picker shows. - Debugging a download that opens as a blob of garbage text because the server returned
text/htmlinstead ofapplication/octet-streamfor a binary. - Writing a file-extension-to-MIME mapping for a custom file-storage service.
- Explaining to a product manager why
image/heicattachments break for desktop browsers that have not implemented the codec.
Common Pitfalls and Edge Cases
- application/octet-stream as a default. It is the IANA-defined fallback for "arbitrary binary data" but browsers treat it as "download, do not render." Use it only when you genuinely do not know the type.
- text/plain with charset. The full header is
Content-Type: text/plain; charset=utf-8; omitting the charset leads some older browsers to render as Latin-1 and mangle non-ASCII text. - application/json charset parameter. RFC 8259 states that JSON is always UTF-8 and does not accept a charset parameter. Adding
charset=utf-8is technically wrong though widely tolerated. - Vendor tree entries. Types like
application/vnd.ms-excelorapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheetare vendor-namespaced and long. Keep the exact spelling - typos silently fail. - Structured suffix ambiguity. A custom type like
application/vnd.api+jsonsignals JSON serialization. Consumers must parse it as JSON after stripping the suffix; the Accept header negotiation forapplication/jsonmay or may not match depending on implementation. - Mime sniffing. Browsers may override the declared Content-Type by sniffing the response body (the
X-Content-Type-Options: nosniffheader disables this). Always send the correct type anyway.
MIME Type Background
MIME (Multipurpose Internet Mail Extensions) was introduced in 1992 by RFCs 1521 and 1522 to extend email beyond ASCII text. HTTP adopted the same system for content negotiation, and Media Types became the canonical name when RFC 2046 superseded the email-specific spec. RFC 6838 (2013) is the current Media Type Specifications and Registration Procedures RFC, and the IANA Media Types registry is the authoritative list. Each type has a top-level category (application, audio, example, font, image, message, model, multipart, text, video) and a subtype. Parameters attach with semicolons, most famously charset. Structured Syntax Suffixes (+json, +xml, +zip, +cbor) were added in RFC 6839 so consumers can treat a custom type as JSON-wrapped without knowing the specific subtype. Over 2,000 types are registered as of 2026.
Comparison to Alternatives
On the command line, file --mime-type /path/to/file sniffs actual file content using magic-number matching (via libmagic) and is the most reliable identifier for a file you have on disk. xdg-mime query filetype file does the same on Linux desktops. Node.js developers use the npm package mime or mime-types, which wraps the Nginx mime.types database for programmatic lookup. Python has mimetypes.guess_type() in the standard library. The Mozilla MDN Common MIME types page is a browseable reference that is better than IANA's raw registry for learning. Use this web tool when you need fast filter-driven lookup without opening a shell - especially handy when you remember part of a name and need to find the exact spelling.
Frequently Asked Questions
What is the difference between a file extension and a MIME type?
An extension is a suffix on the filename that operating systems and software use as a hint for what the file contains; a MIME type is a formal identifier transmitted over network protocols to tell the receiving software what to do with the bytes. The two are usually mapped by a config file, but they can disagree - a .txt file could truthfully contain XML, and a .dat file could be anything. MIME is more reliable because it is what the HTTP response actually declares.
What should I use for JSON API responses?
Use application/json, per RFC 8259, which obsoletes RFC 4627. Do not add a charset parameter - JSON is defined as UTF-8 and a charset declaration is redundant at best, wrong at worst. For JSON:API specifically use application/vnd.api+json. For JSON-LD (Linked Data) use application/ld+json. For newline-delimited JSON streaming use application/x-ndjson or application/jsonl - neither is officially registered but both are widely recognized.
Is the MIME database fetched from a server?
No. The full list of entries is bundled into the page at build time and searched client-side with JavaScript array methods. There is no API call when you type in the search box, no external registry lookup, and no telemetry capturing queries. You can disable your network connection after the page loads and the lookup continues to function - useful on a plane or behind a restrictive firewall.
What is application/octet-stream and when should I use it?
It is the IANA-registered fallback MIME type for "some sequence of octets with unspecified format" - essentially the null hypothesis when you do not know what the file is. Browsers almost always trigger a download prompt when they receive it, which is sometimes exactly what you want for explicit file downloads. If you actually know the type, always send the specific one - application/pdf, image/png, application/zip - because correct typing lets clients render inline, cache appropriately, and choose the right handler.
Why are there multiple MIME types for Microsoft Office files?
Historically Word used application/msword, Excel used application/vnd.ms-excel, PowerPoint used application/vnd.ms-powerpoint. When Office 2007 switched to the XML-based .docx, .xlsx, .pptx formats, Microsoft registered new types under application/vnd.openxmlformats-officedocument.* - long but semantically precise. Both sets still appear in the wild because legacy Office files are everywhere. The extension (.doc vs .docx) is a fast hint for which branch applies.
What does a plus-sign suffix mean in types like application/vnd.api+json?
RFC 6839 defines Structured Syntax Suffixes. They indicate that the type uses a well-known serialization format - +json for JSON, +xml for XML, +zip for ZIP, +cbor for CBOR, +gzip for gzip-compressed. Consumers unaware of the specific subtype can still parse the bytes using the suffix format. For example an unknown application/vnd.company-abc+json can still be read as JSON by any JSON parser even if no one has heard of the vendor.
Is there a MIME type for Markdown?
Yes, text/markdown, registered by RFC 7763 in 2016. Before that, various non-standard types were used - text/x-markdown being the most common. Always prefer text/markdown; some old servers still send text/plain for .md files, which hides the semantic hint from clients that could otherwise render it nicely. Pair it with the parameter; variant= flavor (CommonMark, GFM) if your consumer cares about dialect.
How does MIME interact with the browser's file picker?
The HTML <input type="file" accept="..."> attribute takes a comma-separated list of MIME types or extensions. The browser uses these to filter what the native file picker shows by default - not to enforce validation, which is trivially bypassable. Wildcards like image/* are supported. For the most reliable user experience, combine both forms: accept=".pdf,application/pdf" ensures older browsers and macOS Finder both cooperate.
What happens if I send the wrong MIME type?
Depends on the client. Browsers may render a text file as binary (forcing download) or a binary as text (showing garbage). Some browsers perform MIME sniffing - inspecting the first bytes of the response and overriding the declared type - which is usually helpful but is a security risk for user-uploaded content. The X-Content-Type-Options: nosniff header disables sniffing and forces the browser to trust your declared type, which is the correct default for any API serving user content.
Where can I register a new MIME type?
Via the IANA Media Types registry at iana.org/assignments/media-types. Standards-tree types (top-level like application/json) require an expert review and usually an RFC. Vendor-tree types (application/vnd.yourcompany.thing) are easier: submit a registration form and IANA will publish it. Personal-tree types (application/prs.*) are for personal use and require minimal review. Avoid the x-tree prefix (application/x-foo) - it was deprecated by RFC 6648 and should not be used for new types.
More Developer Tools
Base64 Encoder & Decoder
Encode UTF-8 text to Base64 online or decode Base64 back to UTF-8 and plain text. Runs in your browser with no upload.
Open toolBulk URL Encode / Decode
Encode or decode many URLs at once. Paste a newline-separated list and the tool processes each line in parallel, preserving order and blank lines.
Open toolCode Screenshot
Create beautiful code snippet images with customizable themes.
Open toolColor Converter
Convert colors between HEX, RGB, HSL and CMYK formats.
Open toolCron Expression Parser
Parse cron expressions into human-readable schedules with next run times.
Open toolCSS Formatter / Minifier
Format, beautify and minify CSS code.
Open tool