Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsMIME Types

MIME Types

dev

Extension to MIME type and back, with magic bytes and the header to send

Runs in your browser. Nothing you type is sent anywhere. Updated on 24 Oct 2026.

A MIME type tells a browser what a file is, and getting it wrong means a download where a page should be. Look up an extension or go the other way, with the magic bytes and the header to send. The first 4 bytes identify most formats whatever the name says.

Next:
  • HTTP Status Codes Every HTTP status code, what it means, when to send it and the RFC it comes from
  • Hex Viewer (xxd online) See any file as an xxd hex dump with offsets and text, or turn a hex dump back into a file

How to look up a MIME type by extension or media type

1

Type an extension, a file name or a media type such as application/json into the search box.

2

Select a row in the Types list to see its extensions, magic bytes and where it is registered.

3

Set the charset chips, Force a download or Add nosniff to shape the header shown above the facts.

4

Press Copy type for the media type alone, or Copy header for the full header lines.

About MIME Types

This MIME types lookup works in both directions. Give it an extension, a whole file name or a media type, and it returns the canonical type to send, the extensions that belong to it, the other spellings you will meet, the magic bytes at the start of the file, and whether the content is text or binary.

The part most lists skip is the charset. A type either defines a charset parameter, in which case leaving it out makes browsers guess and mangle anything outside ASCII, or it does not. text/html, text/css, text/csv and image/svg+xml want "; charset=utf-8". application/json does not: RFC 8259 fixes JSON as UTF-8 and registers no charset parameter at all. Binary types never take one. Each row says which case it is and why.

Extensions are not unique, and the tool does not pretend otherwise. A .ts file is TypeScript to your editor and an MPEG transport stream to a video player. DOCX, XLSX, PPTX, EPUB, ODT and APK all begin with the same four zip bytes, so a signature check alone cannot separate them.

The formats this site already processes are read from its shared format table, so a signature added there appears here too. Everything else, from certificates to subtitles to installers, is listed in this tool's own table with the specification that registers it, or an honest note that nothing does. It all runs in your browser; nothing is looked up over the network.

Frequently asked questions

What is the MIME type for a JSON file?

application/json. Do not add a charset parameter: RFC 8259 section 11 defines JSON text as UTF-8 and registers no charset parameter for the type. Some servers still send text/json or application/x-json; both work in practice but neither is the registered spelling.

When should I add charset=utf-8 to Content-Type?

Add it to types that define the parameter and are read as characters: text/html, text/css, text/plain, text/csv, text/javascript and image/svg+xml. Leave it off types whose registration already fixes UTF-8, such as application/json, and off every binary type, where it means nothing.

What is the difference between a MIME type and a media type?

Nothing, in practice. MIME type is the older name, from the email standard the idea came from. The registry IANA keeps is called the Media Types registry, and the HTTP specification says media type. The same string, text/html, is meant by both.

How do I find a file type without trusting the extension?

Read the first bytes. A PNG starts 89 50 4E 47 0D 0A 1A 0A, a PDF starts %PDF, a zip starts 50 4B 03 04. This page shows those signatures and their offset. Note that DOCX, XLSX, EPUB, ODT, JAR and APK all share the zip signature, so you have to look inside to tell them apart.

What MIME type should I use for an unknown file?

application/octet-stream. It is the honest answer for bytes you cannot identify, and browsers download it rather than trying to display it. Do not use it for files you can identify, because it stops images rendering, scripts running and fonts loading.

Why does my file download instead of opening in the browser?

Usually the server sent application/octet-stream because its type map has no entry for the extension, or it sent Content-Disposition: attachment. Look up the right type here, add it to your server configuration, and drop the attachment header if you want the file shown in the page.

Still stuck? Ask about MIME Types and anybody who knows can answer. No account needed.

Common uses

  • Content-Type HeaderThe exact Content-Type header to send, including when to add charset=utf-8
  • File Extension to MIME TypeTurn a file extension into the media type a server should send for it
  • MIME Type ListA full list of common media types by group: text, image, audio, video, archive

Same job, other tools: File to C Array – Turn any file into an unsigned char array for C or C++, like xxd -i · JSON to JSONL Converter – Turn a JSON array into JSON Lines, one record per line, for BigQuery or Elasticsearch · JSONL to JSON Converter – Turn JSON Lines or NDJSON into one JSON array, keeping big numbers exact · JSON Minifier – Strip whitespace from JSON for production · JSON Validator – Check JSON and see exactly where it breaks.

On the related tools: GraphQL Validator – Check a GraphQL query or schema for errors, optionally against your own SDL.

Also works as: MIME Type Lookup.

Related tools

All developer tools
Hex Viewer (xxd online)See any file as an xxd hex dump with offsets and text, or turn a hex dump back into a fileGraphQL FormatterFormat, minify and validate GraphQL queries and schemas, with errors by line and columnJSONL Viewer and ValidatorCheck JSON Lines and NDJSON line by line, view records as a table, convert to a JSON arrayJSON Formatter & ValidatorFormat, validate, minify and sort JSON with exact error positionsSQL FormatterFormat and beautify SQL for PostgreSQL, MySQL, SQL Server and moreMarkdown PreviewWrite Markdown and see it rendered live, with tables, task lists and codeHTML Formatter & MinifierIndent messy HTML, or minify it and see the bytes you savedCSS Beautifier & MinifierTidy a stylesheet or minify it, with the size saved shown

In the collection Debug and Inspect.

Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)