deftools.io Developer Tools

MIME Type Lookup

Searchable database of MIME types and file extensions. Reverse lookup (extension → MIME), forward lookup (MIME → extensions), category filters, common-type cheatsheet, and copy helpers.

Reads the first bytes locally — the file is never uploaded.
Drop a file here, or browse
Copied!

About this tool

A searchable reference of MIME types and their file extensions. Type an extension like pdf or jpg to find the canonical MIME type, or type a MIME type like application/json to see which extensions belong to it. You can also search by keyword — image, video, font — and filter by category using the chips above the list.

Example: search json and you get application/json (extensions .json, .json5), application/ld+json (JSON-LD), and application/manifest+json (web manifest). Search .webp and you land on image/webp, marked as binary. Each row shows the encoding (text/binary), category, and any notes (e.g. text/javascript is the current standard per RFC 9239).

The Detect from file box reads the first few bytes of any file you drop or select and matches them against known magic-byte signatures — useful when a file has a wrong or missing extension. The file is read entirely in your browser; nothing is uploaded.

FAQ

Why does a file with the .js extension show text/javascript and not application/javascript?

RFC 9239 (2021) renamed application/javascript to text/javascript as the standard MIME type for JavaScript. Most modern servers and browsers now use text/javascript, though you may still encounter the legacy application/javascript value in older setups. Both are listed in the database with a note explaining the change.

How does "Detect from file" work, and is it always correct?

It reads the first few bytes of the file and compares them against known magic-byte signatures — for example, PNG files always start with the bytes 89 50 4E 47, PDF files start with %PDF. This is very reliable for common formats (images, PDF, archives, fonts, audio, video) but can be ambiguous for plain text or rarely-seen binary formats. When no signature matches, it falls back to the extension on disk.

What is the difference between a MIME type and a file extension?

A file extension (like .jpg) is a hint for the operating system or server. A MIME type (like image/jpeg) is the authoritative content-type that HTTP servers, email clients, and browsers use to decide how to handle the data. The same extension can map to multiple MIME types — for example .xml can be text/xml, application/xml, or image/svg+xml depending on context.

Why are there multiple MIME types for some extensions?

Some formats evolved over time or serve different contexts. For instance, JavaScript was originally application/javascript, then text/javascript, and module scripts use text/javascript with type="module". The database lists all common variants so you can pick the one appropriate for your use case.

More developer tools

Copied!