MIME TYPE REFERENCE

Search about 150 file extensions and the Content-Type a server should send for each, by extension or by type, with a group filter. A Content-Type parser below checks a header value for the mistakes that make browsers mis-handle files.

Zero retention: your headers never leave this browser. Verify it yourself in DevTools.

Loading the workbench.

About the MIME types

How Can You Verify That Nothing Leaves This Browser?

You do not have to take our word that your headers stay here. Developer tools show every request a page makes, so you can watch this page work and confirm that nothing is sent. The check takes under a minute.

  1. Open your browser developer tools with F12, or Cmd+Option+I on a Mac, and select the Network tab.
  2. Reload the page and let it finish. You will see the page's own files, its web fonts, and one anonymous page-view request. Nothing has been typed yet, so none of them can contain your headers.
  3. Click the clear icon in the Network tab so that the log is empty.
  4. Paste real headers into any lane and read the result.
  5. Look at the Network tab again. It is still empty. For extra proof, turn on offline mode after the page loads and every lane keeps working.

Only two things can add a line to that log, and neither carries your headers. Submitting the feedback form sends the vote and comment you typed. Typing characters in a script the page has not displayed yet, such as Cyrillic or Greek, can make the browser fetch the matching font file, and that request names only the font.

2http never sends a request on your behalf: the request builder writes code for you to run, and the meta inspector reads source you paste instead of fetching a URL. The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site and the anonymous analytics endpoint.

What Is a MIME Type?

A MIME type, or media type, names the format of a body: a type and a subtype, such as image/png or application/json, optionally followed by parameters such as charset=utf-8. Servers send it in the Content-Type header, and browsers use it, not the file extension, to decide whether to render, run, or download a response.

A wrong type has real effects: a script served as text/plain will not run under nosniff, a font with the wrong type may be blocked, and a download may open as gibberish.

What Does the Content-Type Parser Check?

  • The type and subtype, and structured suffixes such as +json and +xml.
  • Parameters such as charset and the multipart boundary.
  • Whether the type is registered with IANA or only common in practice.
  • Common mistakes such as text/json instead of application/json, or application/x-javascript instead of text/javascript.
  • A missing charset on text types, which makes browsers guess the encoding.

How Do You Serve the Right Type?

  1. Look up the extension here and confirm the type your server sends, using the Header decoder on a pasted response.
  2. Add any missing types to your server or CDN configuration.
  3. Send X-Content-Type-Options: nosniff so browsers trust the declared type instead of guessing.
  4. Include charset=utf-8 on text, HTML, CSS, and JavaScript responses.

Why Are Some Types Marked Unregistered?

Many types in everyday use, such as application/x-tar or video/x-matroska, were never registered with IANA but are what servers and browsers actually exchange. They are kept and labelled, so you can tell a standard type from a convention. When you control both ends, prefer the registered type; when you serve files to the public, match what browsers expect. The list was seeded from the 2toolbox reference; 2http is now its canonical home in the 2suite family.

What Other Lanes Are in the Reference Section?

  • HTTP status codes: Every IANA-registered status code, with a page per code.
  • HTTP methods: GET, POST, PUT, PATCH, DELETE and the rest: safe, idempotent, cacheable.

Elsewhere in 2http: Header decoder, Cookie decoder, Cache-Control decoder, CORS checker, User-agent parser, and all eleven lanes on the 2http home page. Part of the 2suite.io privacy-first ecosystem.

Frequently Asked Questions

What is the MIME type for JSON?

application/json. text/json is a common mistake that some clients do not recognize. JSON is always UTF-8, so a charset parameter is optional.

What MIME type should JavaScript use?

text/javascript, which the current standards name as the one correct type. Older values such as application/javascript and application/x-javascript still work in browsers but are obsolete.

What should I use for an unknown binary file?

application/octet-stream. It tells the browser the bytes are opaque, so it offers a download instead of trying to display them.

Does the file extension matter to browsers?

Mostly no for web pages. Browsers follow the Content-Type header for responses. The extension matters for downloads, file pickers, and servers that pick a type from it.

Was this helpful?