File extension ⇄ MIME type lookup — 130+ types, both directions, copy the exact Content-Type — browser-only
- Runs locally
- Category Developer & DevOps
- Best for Checking file type, size, metadata, and obvious mismatch signals before sharing.
What this tool does
A searchable file-extension ⇄ MIME-type reference. Type an extension (png, .mp4, woff2) and get the canonical MIME type you should put in a Content-Type response header, an nginx types block, or a multipart upload. Type a MIME (image/png, application/pdf) — or a wildcard like image/* — and get every extension that maps to it. Covers 130+ types across images, video, audio, documents, Office (docx/xlsx/pptx and OpenDocument), archives (zip/gz/7z/rar/zst), web fonts (woff/woff2/ttf/otf), source code, and data/config formats (json/yaml/toml/csv/ics). Values follow the IANA media-types registry and the WHATWG mime-sniffing standard, with the real-world alternates servers still emit (application/javascript for .js, application/x-gzip for .gz) listed alongside. Text formats are flagged with the ; charset=utf-8 they normally carry, and every row gives a copyable full Content-Type header. Search hits extension, MIME, alternate names, category, and description at once, plus a one-click category filter and a shareable URL that remembers your query. 100% client-side — no upload, no API, no logging. Use it to configure a static server, set a download response header, debug why an upload was rejected, or label an email attachment correctly.
Tool details
- Input
- Files + Text
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy + Preview
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 18 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Developer & DevOps · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How MIME Type Lookup fits into your work
Use it before upload, handoff, archive, support review, or any moment where a file needs one local check before it leaves your machine.
File jobs
- Checking file type, size, metadata, and obvious mismatch signals before sharing.
- Preparing mixed folders for upload, archive, intake, or review.
- Keeping sensitive files in the browser instead of sending them to an account-based service.
File checks
- Do not treat the extension alone as proof of the real file type.
- Review metadata before a file goes to customers, vendors, or a public page.
- Keep the original file until the copied, converted, or exported result is verified.
Good next steps
These links move the current task into a more complete workflow.
- 1 File MIME Type Inspector Upload files and inspect filename, size, browser MIME type, extension, and magic-byte signature locally. Open
- 2 HTTP Status Code Explorer HTTP status code explorer — all 70+ codes with meaning, common causes, real examples, and what to check. Open
- 3 File to Base64 Converter Upload a small file and convert it to raw Base64 or a data URL locally for embeds, fixtures, and tests. Open
Real-world use cases
Configure nginx to serve a new file type correctly
You added .webp images or a .wasm module and nginx is serving them as application/octet-stream, so browsers download instead of rendering. Look up the extension here (image/webp, application/wasm), then add it to your types {} block or a dedicated mime.types include, run nginx -t, and reload. WebAssembly in particular MUST be served as application/wasm or streaming compilation breaks — this table flags that exact requirement.
Set the right Content-Type on a file download endpoint
Your API streams a generated report and the browser opens it as gibberish text instead of downloading an xlsx. Look up xlsx, copy the full header (application/vnd.openxmlformats-officedocument. spreadsheetml.sheet), and set it plus a Content-Disposition: attachment. For text exports like CSV, copy the charset-tagged form text/csv; charset=utf-8 so non-ASCII columns survive.
Debug why a file upload is rejected
An upload form returns 415 Unsupported Media Type or 400. Check what MIME the client is actually sending versus what the endpoint expects. This table tells you the canonical value and the historical aliases (for example .js as text/javascript vs application/javascript), so you can match the server's allow-list exactly instead of guessing.
Label an email or message attachment correctly
A mail client or a chat API needs an explicit MIME type for each attachment, and the wrong one makes a PDF arrive as an unopenable blob. Look up the extension, copy the MIME, and attach with that Content-Type so the recipient's client previews it inline instead of forcing a download or hiding it entirely.
Pick the fallback type for an unknown or generated file
You are generating files server-side and some have no clean extension. When you genuinely cannot identify the content, the safe default is application/octet-stream (forces a download). When you can identify it, set the specific type so browsers render it. This table shows both the specific values and the octet-stream fallback in one place.
Common pitfalls
Sending application/javascript for .js — the WHATWG standard mandates text/javascript. Browsers tolerate the old name but linters and strict servers flag it.
Forgetting ; charset=utf-8 on text types (text/html, text/csv, application/json). JSON is UTF-8 by spec, but CSV and HTML need it or non-ASCII bytes get mojibake.
Treating the file extension as authoritative. The extension is a hint; a renamed file still carries its original bytes. To verify the real type, read the magic bytes with the File MIME Type Inspector.
Using application/octet-stream when a specific type exists. It forces a download and blocks inline preview — only use it deliberately, not as a lazy default.
Privacy
This tool is a static lookup table baked into the page — there is no server call, no file reading, and no logging of what you search. The only data that can leave your browser is the optional shareable URL, which encodes your current search term (for example ?q=image/png) in the query string so a colleague lands on the same filtered view. That term is harmless for normal lookups, but if you ever search something sensitive, copy the result manually rather than sharing the URL, since query strings show up in browser history and server access logs.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- 555 Timer Calculator Astable f = 1.44/((R1+2R2)C) + monostable t = 1.1RC — pick R1, R2, C in Ω/kΩ and µF/nF, read frequency, duty cycle and pulse width — browser-only
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only