Developer Tools
MIME Type Lookup by File Extension
Find the MIME type and Content-Type header for 232 extensions from a file name, path or URL, or look up extensions by MIME type, including image/* families.
How to use MIME Type Lookup by File Extension
Enter file names, extensions, paths, URLs or MIME types, one per line. A single entry shows a summary card; several entries give a table with extension, MIME type, category, Content-Type header and common aliases.
- Enter what you haveType annual-report.pdf, .webp, a full URL such as https://cdn.example.com/app.js?v=3, or a MIME type.
- Use wildcards to browseEnter font/* or image/* to list every type in that family, or a MIME type to find its extensions.
- Copy the headerUse the Content-Type header value, which adds charset=utf-8 to text-based types, in your server or CDN config.
What the lookup table covers
The built-in list has 232 extensions: web and data formats (HTML, CSS, JavaScript, JSON, XML, YAML, CSV), images (PNG, JPEG, WebP, AVIF, HEIC, SVG, ICO), audio and video (MP3, FLAC, MP4, WebM, M3U8), fonts (WOFF, WOFF2, TTF, OTF), documents (PDF, Word, Excel, PowerPoint, OpenDocument, EPUB), archives (ZIP, 7Z, GZ), installers (APK, DMG, MSI), certificates (PEM, CRT, P12) and 3D models (GLB, glTF, STL). Each result has a category, and the Also seen as column gives older names that some servers still send, such as image/x-icon for .ico and application/javascript for .js.
Reverse lookups and edge cases
Type a MIME type to find its extensions: application/json maps to .json and .map, and text/javascript to .js, .mjs and .cjs. A query string or #fragment in a URL is ignored, and backup.tar.gz returns the outer compression type, application/gzip. Watch out for .ts, which is registered as an MPEG transport stream (video/mp2t) rather than TypeScript. Extensions missing from the table are reported with the generic application/octet-stream, which makes browsers download a file instead of displaying it.
Accuracy and data handling
Validate the result with your project's own tests and runtime rules before using it in production. The calculation runs in your current browser; the tool code does not send the input to a processing API.
FAQ
What MIME type should JavaScript files use?
The current standard is text/javascript, which is what the lookup returns for .js, .mjs and .cjs. The older application/javascript still works in browsers and is listed as an alias.
Why add charset=utf-8 to Content-Type?
For text such as HTML, CSS, JSON and JavaScript it tells the browser how to decode characters, which avoids garbled accents and symbols. Images, video and other binary files do not need it.
What if my extension is not listed?
Serve it as application/octet-stream, the generic binary type. Browsers will then offer the file as a download rather than trying to open it.
More Developer Tools
Related toolsGenerate Cache-Control headers and server config for browsers and CDNs
Escape regex special characters for JavaScript, PHP, Python, Go or grep
Translate text into binary code and binary back into readable text
Build or decode HTTP Basic authentication headers in your browser
See whether a JWT is valid, expired or not yet valid, and how long is left
Create secure, URL-safe Nano IDs with your own length, prefix and alphabet