API & HTTP

MIME Type Lookup

Type a file name, an extension or a MIME type to get the matching Content-Type, with copy-ready header, HTML and server-config snippets. Paste a Content-Type header to check it. Everything runs in your browser.

Ready.

All entries

The list is filtered by what you type above.

ExtensionMIME typeGroupAlso seenCopy
.txttext/plainText and code
.html, .htmtext/htmlText and code
.csstext/cssText and code
.js, .mjstext/javascriptText and codeAlso seen: application/javascript
.jsxtext/jsxText and code
.md, .markdowntext/markdownText and codeAlso seen: text/x-markdown
.csvtext/csvText and code
.tsvtext/tab-separated-valuesText and code
.icstext/calendarText and code
.vcftext/vcardText and codeAlso seen: text/x-vcard
.pytext/x-pythonText and code
.shapplication/x-shText and code
.cshapplication/x-cshText and code
.phpapplication/x-httpd-phpText and code
.sqlapplication/sqlText and code
.yaml, .ymlapplication/yamlText and codeAlso seen: text/yaml, application/x-yaml, text/x-yaml
.tomlapplication/tomlText and codeAlso seen: text/toml
.xmlapplication/xmlText and codeAlso seen: text/xml
.xhtmlapplication/xhtml+xmlText and code
.jsonapplication/jsonWeb and API data
.jsonldapplication/ld+jsonWeb and API data
.geojsonapplication/geo+jsonWeb and API data
.mapapplication/jsonWeb and API data
.webmanifestapplication/manifest+jsonWeb and API data
.ndjson, .jsonlapplication/x-ndjsonWeb and API data
.wasmapplication/wasmWeb and API data
.rssapplication/rss+xmlWeb and API data
.atomapplication/atom+xmlWeb and API data
noneapplication/x-www-form-urlencodedWeb and API data
nonemultipart/form-dataWeb and API data
nonetext/event-streamWeb and API data
noneapplication/problem+jsonWeb and API data
noneapplication/json-patch+jsonWeb and API data
noneapplication/merge-patch+jsonWeb and API data
.pngimage/pngImages
.jpg, .jpegimage/jpegImages
.gifimage/gifImages
.webpimage/webpImages
.avifimage/avifImages
.apngimage/apngImages
.svgimage/svg+xmlImages
.bmpimage/bmpImages
.icoimage/vnd.microsoft.iconImagesAlso seen: image/x-icon
.tif, .tiffimage/tiffImages
.heicimage/heicImages
.heifimage/heifImages
.jxlimage/jxlImages
.mp3audio/mpegAudio
.aacaudio/aacAudio
.wavaudio/wavAudioAlso seen: audio/x-wav, audio/wave, audio/vnd.wave
.webaaudio/webmAudio
.oga, .oggaudio/oggAudio
.opusaudio/oggAudioAlso seen: audio/opus
.flacaudio/flacAudioAlso seen: audio/x-flac
.m4aaudio/mp4AudioAlso seen: audio/x-m4a
.mid, .midiaudio/midiAudioAlso seen: audio/x-midi
.cdaapplication/x-cdfAudio
.mp4video/mp4Video
.webmvideo/webmVideo
.ogvvideo/oggVideo
.mpegvideo/mpegVideo
.avivideo/x-msvideoVideo
.movvideo/quicktimeVideo
.mkvvideo/x-matroskaVideoAlso seen: video/matroska
.3gpvideo/3gppVideo
.3g2video/3gpp2Video
.tsvideo/mp2tVideo
.m3u8application/vnd.apple.mpegurlVideoAlso seen: application/x-mpegURL
.mpdapplication/dash+xmlVideo
.woff2font/woff2Fonts
.wofffont/woffFontsAlso seen: application/font-woff
.ttffont/ttfFontsAlso seen: application/x-font-ttf
.otffont/otfFonts
.eotapplication/vnd.ms-fontobjectFonts
.pdfapplication/pdfDocuments
.docapplication/mswordDocuments
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.documentDocuments
.xlsapplication/vnd.ms-excelDocuments
.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheetDocuments
.pptapplication/vnd.ms-powerpointDocuments
.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentationDocuments
.odtapplication/vnd.oasis.opendocument.textDocuments
.odsapplication/vnd.oasis.opendocument.spreadsheetDocuments
.odpapplication/vnd.oasis.opendocument.presentationDocuments
.rtfapplication/rtfDocuments
.epubapplication/epub+zipDocuments
.azwapplication/vnd.amazon.ebookDocuments
.vsdapplication/vnd.visioDocuments
.abwapplication/x-abiwordDocuments
.zipapplication/zipArchivesAlso seen: application/x-zip-compressed
.gzapplication/gzipArchivesAlso seen: application/x-gzip
.tarapplication/x-tarArchives
.bzapplication/x-bzipArchives
.bz2application/x-bzip2Archives
.7zapplication/x-7z-compressedArchives
.rarapplication/vnd.rarArchivesAlso seen: application/x-rar-compressed
.xzapplication/x-xzArchives
.zstapplication/zstdArchives
.arcapplication/x-freearcArchives
.jarapplication/java-archiveArchives
.apkapplication/vnd.android.package-archiveArchives
.mpkgapplication/vnd.apple.installer+xmlArchives
.binapplication/octet-streamOther and binary
.ogxapplication/oggOther and binary
.xulapplication/vnd.mozilla.xul+xmlOther and binary

What this tool does

It answers the question “what should the Content-Type be?” in both directions. Enter a file name, a URL or an extension to get the type. Enter a type to get its usual extensions. Paste a whole Content-Type header to check its syntax. Each answer comes with snippets you can copy: the HTTP header, an HTML accept attribute, an nginx types line and an Apache AddType line, plus notes on pitfalls for that type.

The table below the results lists every entry and can be narrowed by group (text, images, fonts and so on) and by name form (see the next section).

What a MIME type and a Content-Type are

A MIME type, also called a media type, names the kind of data in a message. It has the form type/subtype, for example text/html or image/png. In HTTP it travels in the Content-Type header, and in an upload form it appears in the accept attribute. The name MIME comes from email, where it was first used.

  • Type is the broad family: text, image, audio, video, font, application (anything that does not fit the others) and multipart.
  • Subtype is the specific format. A +suffix such as +json or +xml says the content is built on that syntax, so application/problem+json can be read by a generic JSON parser.
  • Parameters follow a semicolon, for example text/html; charset=utf-8. The common ones are charset and, for multipart bodies, boundary.
  • Name form. A subtype with the prefix vnd. belongs to a vendor, x- marks an unregistered name, prs. is the personal tree, and everything else has no prefix. The filter in the tool uses this form. It describes how the name is written, not whether a type is registered with IANA, which this tool does not check.

Types are case-insensitive, but lowercase is the convention. The official list of registered types is the IANA media types registry.

MIME type versus file extension

The extension is part of a file name. The MIME type is metadata about the content, and over HTTP it is the type, not the extension, that tells the client what to do. A browser does not look at .json in a URL; it looks at the Content-Type the server sent.

  • A web server decides the type by mapping the extension through a table (nginx mime.types, Apache mime.types and AddType). That is what this tool’s table is a reference for.
  • Dynamic responses have no extension. An API route such as /api/users must set its own Content-Type.
  • One extension can map to more than one name (for example .yaml, .wav and .ico), and some types have several extensions (.jpg and .jpeg).
  • Do not trust either for security. A file name and the type sent by a browser during an upload are supplied by the client and can be anything. Check the content (for example the first bytes of the file) on the server, store uploads outside the web root or under a type you choose, and never serve user-uploaded HTML or SVG from your own origin without care.

Common web types

These are the headers most sites and APIs need. Anything with a text type should state its character set.

ContentContent-Type to send
HTML pagetext/html; charset=utf-8
CSStext/css; charset=utf-8
JavaScripttext/javascript; charset=utf-8
JSON API responseapplication/json
JSON error body (RFC 9457)application/problem+json
Plain texttext/plain; charset=utf-8
XMLapplication/xml
CSVtext/csv; charset=utf-8
PNG / JPEG / WebP / AVIFimage/png, image/jpeg, image/webp, image/avif
SVGimage/svg+xml
PDFapplication/pdf
WOFF2 fontfont/woff2
WebAssemblyapplication/wasm
Web app manifestapplication/manifest+json
Form postapplication/x-www-form-urlencoded
File uploadmultipart/form-data; boundary=...
Server-Sent Eventstext/event-stream
Unknown binary downloadapplication/octet-stream

Setting types on a server

Most servers ship with a table that covers common extensions. You only need to add a mapping for a format the table lacks, such as .wasm or .webmanifest on an older install.

http {
  include mime.types;
  default_type application/octet-stream;
}

# add one type without losing the defaults
server {
  types {
    include mime.types;
    application/wasm wasm;
  }
}
AddType application/wasm .wasm
AddType application/manifest+json .webmanifest
AddDefaultCharset utf-8

The first block is nginx. A types block replaces the inherited table in its context, which is why it starts with include mime.types. The second block is Apache. Static hosts and CDNs usually have their own setting or a headers file, and a framework that serves an API sets the header in code. To see what a server actually sends, request a file and inspect the response with the HTTP Header Analyzer or curl -I (the cURL Command Generator builds the command).

Character sets

For text/* types the charset parameter tells the client how to turn bytes into characters. Use charset=utf-8 for HTML, CSS, JavaScript, CSV and plain text. Without it, a client may guess, and a wrong guess shows up as garbled accents or symbols. JSON is the exception: it is always UTF-8, so application/json; charset=utf-8 is redundant and a few strict clients complain about it. text/xml without a charset was historically read as US-ASCII, one reason application/xml is preferred.

nosniff and why a wrong type breaks a page

Browsers used to inspect content and guess its real type. That is a security risk, so the header X-Content-Type-Options: nosniff tells them to trust the declared type. With it, a script or stylesheet sent with the wrong type is blocked. In Chrome the console shows messages like these:

The usual cause is that the URL returned an HTML error page or a redirect to the app shell instead of the file, for example after a missing file or a wrong path. Check the real response first: look at its status code (see HTTP Status Codes) and its type. Module scripts and .wasm files are always checked, with or without nosniff. To set nosniff and other headers, use the Security Headers Generator.

Uploads and APIs

  • Content-Type describes the body you are sending or receiving. Accept says what you want back. A client sends Accept: application/json to ask for JSON, and the server answers with Content-Type: application/json.
  • JSON requests need Content-Type: application/json. Many servers ignore a JSON body sent as text/plain or as a form type.
  • File uploads use multipart/form-data. The header must include the boundary the body uses. Let the browser, fetch with a FormData body, or your HTTP library set the header. If you set it yourself without the boundary, the server cannot split the parts.
  • The HTML accept attribute on <input type="file"> takes extensions and types, such as .png,image/png, or a wildcard such as image/*. It is a hint for the file picker and does not stop anyone from sending something else, so validate again on the server.
  • Errors. A server that cannot read the body type answers 415 Unsupported Media Type. One that cannot produce a type you asked for in Accept may answer 406 Not Acceptable. Both are explained under HTTP Status Codes.
  • Data URIs carry a type too: data:image/png;base64,.... The Image to Base64 tool builds one from an image, and the Base64 Encoder & Decoder handles other data.

Common mistakes

  • Serving everything as application/octet-stream or text/plain. Browsers then download the file or refuse to run it.
  • Using an obsolete JavaScript type such as application/javascript. It still works, but text/javascript is the current standard (RFC 9239).
  • Writing image/jpg. The type is image/jpeg, although the extension is .jpg.
  • Sending JSON as text/html or text/plain, which breaks clients that check the type and can create an XSS risk when a browser renders it.
  • Adding a charset to JSON, or leaving it off HTML and text.
  • Serving .wasm without application/wasm, which disables streaming compilation.
  • Treating .ts as TypeScript. In most MIME tables .ts is video/mp2t, an MPEG transport stream. Servers rarely need to send TypeScript, and build tools usually emit .js.
  • Putting a wildcard such as image/* in a Content-Type. Wildcards are only for Accept and the HTML accept attribute.
  • Relying on the extension or the client’s reported type to validate an upload.

Data source and limits

The list is curated by DevToolEra. It is not a copy of another table and not a live view of the IANA registry. It contains about 100 entries: common web, API, image, audio, video, font, document and archive formats, plus several types with no file extension (form posts, multipart bodies, event streams and JSON patch formats).

  • How it was checked. Entries were compared with the mime.types file shipped with a Debian system and with the table in Python’s mimetypes module. Differences are shown as “Also seen” names or in the note on the entry. The notes draw on the RFCs for the formats concerned, for example RFC 8259 for JSON, RFC 9239 for JavaScript, RFC 9512 for YAML and RFC 9457 for problem details.
  • Not exhaustive. There are many more registered types than this list. A missing entry does not mean a type is invalid. Look it up in the IANA registry linked above.
  • Not a registration checker. The “name form” filter only reads the subtype prefix. It does not tell you whether IANA has registered a name.
  • Not a file inspector. The tool never opens a file. A name or extension you type is matched against the table, nothing more. To find out what a file really contains, inspect its bytes.
  • Conventions change. Names such as application/yaml are recent. Software that predates them may expect an older name, so check what your receiver accepts.

Frequently asked questions

What is the MIME type of a file extension?

Enter the extension (such as .json) or the file name. The result shows the type, a ready-to-copy header and server snippets, and any notes. For example, .json gives application/json and .svg gives image/svg+xml.

What is the difference between MIME type and Content-Type?

The MIME type is the type/subtype name. Content-Type is the HTTP header that carries it, optionally with parameters such as charset.

What is application/octet-stream?

It means arbitrary binary data. Browsers do not display it but offer a download. It is the right default for unknown content and the wrong choice for a format you know.

Does the file extension control the MIME type?

Not directly. On a web server a table maps extensions to types, but the client uses only the type the server sends. Content generated by code can have any type, whatever the URL ends in.

Can I check the type of an actual file?

Not here. This tool matches names and extensions only and does not read your files.

Why does one extension have several types?

Formats gain official names over time while older software keeps the earlier ones, for example image/x-icon and image/vnd.microsoft.icon for .ico. This tool shows the preferred name first and the others as “Also seen”.

Privacy and local processing

This tool runs entirely in your browser. The names, extensions and headers you type are matched against the list on this page and are not sent to a server. Nothing is stored.

Share this tool

Your data is not included in this link.