MIME type lookup — find the Content-Type for a file extension

Type a file extension or part of a type and the table shows the matching MIME type to put in a Content-Type header, an upload rule or an accept attribute, from web assets and fonts to Office files and archives.

Live demo · real result from this tool
Showing106 of 106 types

Table

ExtensionMIME typeDescription
.html .htmtext/htmlHTML document
.csstext/cssStylesheet
.js .mjstext/javascriptJavaScript (RFC 9239)
.jsonapplication/jsonJSON
.jsonldapplication/ld+jsonJSON-LD
.mapapplication/jsonSource map
.xmlapplication/xmlXML (text/xml is also used)
.txttext/plainPlain text
.csvtext/csvComma-separated values
.tsvtext/tab-separated-valuesTab-separated values
.mdtext/markdownMarkdown
.icstext/calendariCalendar
.vcftext/vcardvCard contact
.rtfapplication/rtfRich Text Format
.yaml .ymlapplication/yamlYAML (RFC 9512)
.tomlapplication/tomlTOML
.wasmapplication/wasmWebAssembly
.webmanifestapplication/manifest+jsonWeb app manifest
.rssapplication/rss+xmlRSS feed
.atomapplication/atom+xmlAtom feed
.xhtmlapplication/xhtml+xmlXHTML
.pngimage/pngPNG image
.jpg .jpegimage/jpegJPEG image
.gifimage/gifGIF image
.webpimage/webpWebP image
.avifimage/avifAVIF image
.svgimage/svg+xmlSVG image
.icoimage/vnd.microsoft.iconIcon (image/x-icon is also seen)
.bmpimage/bmpBitmap image
.tif .tiffimage/tiffTIFF image
.heicimage/heicHEIC image
.heifimage/heifHEIF image
.jxlimage/jxlJPEG XL image
.apngimage/apngAnimated PNG
.mp3audio/mpegMP3 audio
.wavaudio/wavWAV audio
.ogg .ogaaudio/oggOgg audio
.opusaudio/opusOpus audio
.aacaudio/aacAAC audio
.m4aaudio/mp4MPEG-4 audio
.flacaudio/flacFLAC audio
.webaaudio/webmWebM audio
.mid .midiaudio/midiMIDI
.mp4video/mp4MPEG-4 video
.webmvideo/webmWebM video
.ogvvideo/oggOgg video
.movvideo/quicktimeQuickTime video
.avivideo/x-msvideoAVI video
.mkvvideo/x-matroskaMatroska video
.mpegvideo/mpegMPEG video
.3gpvideo/3gpp3GPP video
.tsvideo/mp2tMPEG transport stream (also TypeScript files — serve those as text)
.m3u8application/vnd.apple.mpegurlHLS playlist
.mpdapplication/dash+xmlMPEG-DASH manifest
.vtttext/vttWebVTT subtitles
.srtapplication/x-subripSubRip subtitles
.wofffont/woffWOFF font
.woff2font/woff2WOFF2 font
.ttffont/ttfTrueType font
.otffont/otfOpenType font
.eotapplication/vnd.ms-fontobjectEmbedded OpenType font
.pdfapplication/pdfPDF document
.docapplication/mswordWord 97–2003
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.documentWord document
.xlsapplication/vnd.ms-excelExcel 97–2003
.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheetExcel workbook
.pptapplication/vnd.ms-powerpointPowerPoint 97–2003
.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentationPowerPoint presentation
.odtapplication/vnd.oasis.opendocument.textOpenDocument text
.odsapplication/vnd.oasis.opendocument.spreadsheetOpenDocument spreadsheet
.odpapplication/vnd.oasis.opendocument.presentationOpenDocument presentation
.epubapplication/epub+zipEPUB e-book
.zipapplication/zipZIP archive
.gzapplication/gzipGzip archive
.tarapplication/x-tarTar archive
.7zapplication/x-7z-compressed7-Zip archive
.rarapplication/vnd.rarRAR archive
.bz2application/x-bzip2Bzip2 archive
.xzapplication/x-xzXZ archive
.zstapplication/zstdZstandard archive
.jarapplication/java-archiveJava archive
.apkapplication/vnd.android.package-archiveAndroid package
.exeapplication/vnd.microsoft.portable-executableWindows executable
.msiapplication/x-msiWindows installer
.dmgapplication/x-apple-diskimagemacOS disk image
.debapplication/vnd.debian.binary-packageDebian package
.rpmapplication/x-rpmRPM package
.isoapplication/x-iso9660-imageDisc image
.binapplication/octet-streamArbitrary binary data (the default for unknown files)
.shapplication/x-shShell script
.phpapplication/x-httpd-phpPHP source
.pytext/x-pythonPython source
.sqlapplication/sqlSQL
.graphqlapplication/graphql-response+jsonGraphQL response
.pemapplication/x-pem-filePEM certificate or key
.crt .cerapplication/pkix-certX.509 certificate
.p12 .pfxapplication/x-pkcs12PKCS#12 bundle
.gltfmodel/gltf+jsonglTF 3D model
.glbmodel/gltf-binaryBinary glTF
.stlmodel/stlSTL 3D model
.usdzmodel/vnd.usdz+zipUSDZ 3D model
(form)application/x-www-form-urlencodedHTML form body (key=value&…)
(form)multipart/form-dataForm body with file uploads
(stream)text/event-streamServer-sent events
(ndjson)application/x-ndjsonNewline-delimited JSON
(problem)application/problem+jsonHTTP API error details (RFC 9457)

106 rows — scroll inside the table, or download the CSV.

Processed on your device — nothing is uploaded.

How to use the MIME type lookup

  1. Type in Filter: an extension (.webp or webp), a type prefix (video/, font/) or a word from the description (Excel, archive).
  2. You can paste a glob such as *.mjs; the * is ignored.
  3. Read the Extension, MIME type and Description columns. “Showing” gives the count out of 106.
  4. Copy the type into your server config, upload code or header, or download the table as mime-types.csv.

What it does and when to use it

A wrong Content-Type causes quiet failures. A module script served as text/plain will not run, a font with the wrong type can be blocked, and an SVG sent as application/octet-stream downloads instead of showing. This lookup gives the right value quickly when you write an nginx types block, set ContentType on an S3 upload, check an <input accept> list or debug a download that opens in the browser.

The list covers web files (HTML, CSS, JavaScript, JSON, WebAssembly, manifests), images including AVIF, HEIC and JPEG XL, audio, video and streaming playlists, subtitles, fonts, Office and OpenDocument files, archives, installers, certificates and 3D models. For the headers around it, see the HTTP Headers Ref.

How it works

The table is a fixed list in the page, drawn from MDN’s list of common media types and the RFCs named in some descriptions. The filter is split into words and a row is kept when every word appears in one of its cells. A leading *. or . is normalised so *.mjs, .mjs and mjs behave the same. Nothing is sent to a server.

Worked examples

ES modules. Filter *.mjs:

.js .mjs | text/javascript | JavaScript (RFC 9239)

Web fonts. Filter font/ returns Showing: 4 of 106 types: font/woff, font/woff2, font/ttf and font/otf. The older .eot uses application/vnd.ms-fontobject and is not in the font/ family.

JSON flavours. Filter json returns 8 rows, among them application/ld+json for JSON-LD, application/manifest+json for .webmanifest, and:

(problem) | application/problem+json | HTTP API error details (RFC 9457)

Limits and tips

  • 106 common types, not the full IANA registry. Some rows are widely used x- types, such as application/x-7z-compressed.
  • A substring filter can match more than you expect: .ts also finds .tsv.
  • The extension is only a hint. To check what a file really is, look at its first bytes with the Hex Dump Viewer.
  • For multipart/form-data uploads, cURL to Code turns curl -F commands into code.

Frequently asked questions

Is JavaScript application/javascript or text/javascript?
text/javascript. RFC 9239 (2022) made it the one standard type for JavaScript and marked application/javascript as obsolete. Browsers accept both, but a module script sent as a non-JavaScript type such as text/plain will not run.
Why does .ts show video/mp2t?
.ts is registered for MPEG transport stream video, so some servers send TypeScript files with that type. If you serve TypeScript source as plain files, set text/plain or a text type yourself.
Do I need to add charset to the type?
For text types such as text/html, text/css and text/plain, add "; charset=utf-8" to the header. JSON is UTF-8 by definition and does not need it.
What should I use for an unknown binary file?
application/octet-stream. Browsers treat it as a download rather than trying to display it.
What are the rows without an extension?
Request and response body types that are not tied to a file, such as form posts (application/x-www-form-urlencoded and multipart/form-data), server-sent events (text/event-stream), newline-delimited JSON and problem+json error bodies.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close