🔧 Lookup mode
Switch direction to look up an extension from a MIME type, or vice versa. Inputs are case-insensitive and a leading dot on extensions is ignored.
🔍 Search
Try pdf, .png, SVG, application/json,
image/webp, or multipart/form-data.
📤 Result
- {{ m }}
- .{{ e }}
pdf) or a MIME type (e.g.
application/json) to see the result.
ℹ️ About MIME Type Lookup
What MIME types are and why they matter
A MIME type (also called a media type or content type) is a two-part
label of the form type/subtype — for example application/pdf,
image/svg+xml, or text/html. Browsers, mail clients, HTTP servers, and
REST APIs use the value to decide how to parse, render, or download a payload. Get it wrong and a
PDF downloads as a text file, a JSON response renders as plaintext, or an HTML page is shown as
source code.
This tool resolves either direction: paste a file extension like pdf
or .WEBP and see the matching MIME type(s), or paste a MIME type
like application/zip and see which file extensions are commonly associated with it.
The curated table covers 120+ entries from across the IANA Media Types Registry — text, image,
video, audio, application, font, model, and multipart.
The eight registered top-level categories
text/*— human-readable formats:text/plain,text/html,text/css,text/csv,text/javascript,text/markdown,text/calendar.image/*— raster and vector images:image/png,image/jpeg,image/svg+xml,image/webp,image/avif,image/heic,image/jxl.video/*— video containers and codecs:video/mp4,video/webm,video/quicktime,video/x-matroska,video/MP2T.audio/*— audio codecs and containers:audio/mpeg,audio/wav,audio/flac,audio/ogg,audio/opus,audio/aac.application/*— everything that isn’t obviously text or media:application/json,application/pdf,application/zip,application/wasm, Office documents, archives, executables.font/*— web fonts standardized by RFC 8081:font/woff,font/woff2,font/ttf,font/otf,font/collection.model/*— 3D models and scenes:model/gltf+json,model/gltf-binary,model/obj,model/stl.multipart/*— composite bodies for email and HTTP:multipart/form-data,multipart/mixed,multipart/alternative,multipart/signed.
How the lookup works
Extension input is normalized: any leading dot is stripped (so .pdf and
pdf resolve identically) and the value is lowercased
(PDF = pdf). MIME type input is lowercased before comparison so
Application/Pdf resolves the same as application/pdf. The lookup
returns the canonical IANA form on output.
One extension may map to multiple registered MIME types (for example js →
text/javascript and the legacy application/javascript). One MIME type
may map to multiple extensions (for example image/jpeg →
jpg, jpeg, jpe, jfif). The result panel
lists all matches; the primary value is the most common modern label.
Practical use cases
- Setting
Content-Typeheaders when serving static files or REST JSON. A wrong header is one of the most common causes of "the browser is showing source instead of rendering my page". - Building a file-upload
acceptattribute: paste an extension to find the right MIME type for an<input type="file" accept="…">or a drag-and-drop validator. - Choosing the right extension after receiving a download whose extension is
missing (e.g. a
?attachment=1response that arrived asblob). - Debugging email attachments: a wrong MIME type causes some clients to refuse to preview the file or to mark the message as suspicious.
- Verifying IANA registration: look up the RFC reference to confirm a type
is standardized vs. an unregistered
x-form.
Examples
pdf→application/pdf(RFC 8118).SVG→image/svg+xmljson→application/json(RFC 8259)woff2→font/woff2(RFC 8081)application/zip→zip(RFC 1951)image/webp→webp(RFC 9649)multipart/form-data→ no extension (request-body type, RFC 7578)
Source references
- IANA Media Types Registry — the canonical, continuously-updated registry of all standardized media types.
- RFC 6838 — Media Type Specifications and Registration Procedures. Defines the structure and naming rules for MIME types.
- RFC 2045 / RFC 2046 — MIME (Multipurpose Internet Mail Extensions) Parts One and Two.
- WHATWG MIME Sniffing — browser-side rules for how MIME types interact with sniffing fallbacks.
Limits and practical notes
- The table is a curated subset of the IANA registry. New entries are added regularly upstream; the curated table covers the formats most developers actually encounter.
- Some entries use
x-prefixed legacy names (e.g.application/x-rar-compressed); where an IANA-registered form exists (e.g.application/vnd.rar) it is listed alongside. - Multipart types and a few request-body types (e.g.
application/x-www-form-urlencoded,multipart/form-data) do not correspond to a file extension — they describe HTTP request bodies, not files on disk. - Lookups run in your browser. The same logic is exposed by the API endpoint below, which uses the shared Module-First TypeScript module.
API Usage Example:
POST /api/tools/file/mime-type-lookup
Content-Type: application/json
{
"operation": "lookupByExtension",
"extension": "pdf"
}