Developer ToolsA little help for every day

Search by name or task, such as JSON or percentage.

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.

View all tools
ResultUpdates as you type
InputExtensionMIME typeCategoryContent-Type headerAlso seen as
annual-report.pdf.pdfapplication/pdfDocumentapplication/pdf—
.webp.webpimage/webpImageimage/webp—
application/json.jsonapplication/jsonDataapplication/json; charset=utf-8—
application/json.mapapplication/jsonDataapplication/json; charset=utf-8—
font/*.wofffont/woffFontfont/woff—
font/*.woff2font/woff2Fontfont/woff2—
font/*.ttffont/ttfFontfont/ttf—
font/*.otffont/otfFontfont/otf—
font/*.ttcfont/collectionFontfont/collection—

232 common extensions built in.

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.

  1. 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.
  2. Use wildcards to browseEnter font/* or image/* to list every type in that family, or a MIME type to find its extensions.
  3. 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.

Often Used Together

Next step

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 tools