MIME Type Lookup

[ MIME TYPES ]
49
Search by extension, type or name.
Types listed49
Need a charset8
Matching49
.htmltext/html; charset=utf-8

HTML document

Also seen as application/xhtml+xml

Serve with charset=utf-8. Without it the browser guesses, and a page of UTF-8 renders as mojibake.

.htmtext/html; charset=utf-8

HTML document

.csstext/css; charset=utf-8

Cascading style sheet

.jstext/javascript; charset=utf-8

JavaScript

Also seen as application/javascript · application/x-javascript

text/javascript is what the WHATWG specification requires. The application/ forms are historical and still widely seen.

.mjstext/javascript; charset=utf-8

JavaScript module

.jsonapplication/json

JSON

No charset parameter. JSON is defined as UTF-8, so adding one is redundant and technically invalid.

.jsonldapplication/ld+json

JSON-LD

Structured data. Must NOT be served as application/json if you want it treated as linked data.

.xmlapplication/xml

XML

Also seen as text/xml

text/xml defaults to US-ASCII when no charset is given, which is almost never what is meant. Prefer application/xml.

.csvtext/csv; charset=utf-8

Comma-separated values

.txttext/plain; charset=utf-8

Plain text

.mdtext/markdown; charset=utf-8

Markdown

.svgimage/svg+xml

SVG vector image

An image and a document at once. It can carry script, so never serve an uploaded SVG from your own origin.

.pngimage/png

PNG image

.jpgimage/jpeg

JPEG image

The type is image/jpeg for both .jpg and .jpeg. There is no image/jpg.

.jpegimage/jpeg

JPEG image

.gifimage/gif

GIF image

.webpimage/webp

WebP image

.avifimage/avif

AVIF image

.icoimage/x-icon

Icon

Also seen as image/vnd.microsoft.icon

image/x-icon carries a deprecated x- prefix and is nonetheless what every browser expects.

.bmpimage/bmp

Bitmap image

.tiffimage/tiff

TIFF image

.heicimage/heic

HEIC image

What an iPhone produces by default. Browser support is still thin.

.mp3audio/mpeg

MP3 audio

audio/mpeg, not audio/mp3 — which is not a registered type.

.wavaudio/wav

WAV audio

.oggaudio/ogg

Ogg audio

.m4aaudio/mp4

MPEG-4 audio

.mp4video/mp4

MPEG-4 video

.webmvideo/webm

WebM video

.movvideo/quicktime

QuickTime video

.avivideo/x-msvideo

AVI video

.pdfapplication/pdf

PDF document

.docapplication/msword

Word document (legacy)

.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document

Word document

The long Office types are correct and are routinely truncated by hand. Copy them rather than typing them.

.xlsapplication/vnd.ms-excel

Excel workbook (legacy)

.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Excel workbook

.pptapplication/vnd.ms-powerpoint

PowerPoint (legacy)

.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentation

PowerPoint

.rtfapplication/rtf

Rich text

.wofffont/woff

WOFF font

.woff2font/woff2

WOFF2 font

font/woff2, not application/font-woff2. The font/ tree was registered in RFC 8081 and supersedes the older forms.

.ttffont/ttf

TrueType font

.otffont/otf

OpenType font

.zipapplication/zip

ZIP archive

.gzapplication/gzip

Gzip archive

.tarapplication/x-tar

Tar archive

.7zapplication/x-7z-compressed

7-Zip archive

.rarapplication/vnd.rar

RAR archive

.binapplication/octet-stream

Arbitrary binary

The fallback for anything unknown. Browsers download it rather than trying to render it, which is usually the safe choice.

.wasmapplication/wasm

WebAssembly module

Must be served with this exact type — streaming compilation refuses anything else.

[ WHAT THIS IS ]

One thing causes most of the trouble: a missing charset. text/html with no charset leaves the browser to guess the encoding — and its guess is often not UTF-8. That is where accented characters and the peso sign turn into rubbish.

But not everything needs one. JSON is defined as UTF-8 by its own specification, so adding a charset there is redundant. This page marks which types need one rather than telling you to always add it.

And the reverse lookup is not a function. Extension to type has one right answer — but image/jpeg is .jpg and .jpeg. This returns all of them rather than picking one and appearing authoritative about it.

[ QUESTIONS ]

Why does my UTF-8 page render as gibberish?

Almost certainly a missing charset. text/html with no charset parameter leaves the browser to guess the encoding, and its guess is often not UTF-8 — so accented characters and the peso sign come out as mojibake. Serve text/html; charset=utf-8. The same applies to text/css, text/csv and text/plain.

Should I add a charset to application/json?

No. JSON is defined as UTF-8 by its own specification, so a charset parameter is redundant and technically not permitted on that type. The rule is not “always add a charset” — it is “add one where the type would otherwise be ambiguous”, which is why this page marks the types that need it.

Is it image/jpg or image/jpeg?

image/jpeg, always — for both the .jpg and .jpeg extensions. There is no registered type called image/jpg, though it is written by hand constantly. The same trap catches audio: it is audio/mpeg, not audio/mp3.

Why does one type have several extensions?

Because the mapping is not a function in that direction. image/jpeg is both .jpg and .jpeg; image/tiff is .tif and .tiff. Going from an extension to a type has one right answer, but going back has several, so this page returns all of them rather than picking one and appearing authoritative about it.

What should I serve for a file type I do not recognise?

application/octet-stream. Browsers download it rather than trying to render it, which is the safe default — the dangerous failure is serving unknown content as something a browser will execute or display. Never guess a type from user-supplied input.

Why is serving an uploaded SVG risky?

Because an SVG is a document as well as an image. It can carry script, and if it is served from your own origin that script runs with your site’s privileges. Serve user-supplied SVGs from a separate origin, or convert them to a raster format. This site has no upload path at all, which is the simplest version of the same answer.

What happened to the x- prefix?

RFC 6648 deprecated it in 2012 — the idea that experimental types should be marked turned out to cause more churn than it prevented. A few x- types are now permanently fixed in other specifications and will never change, notably application/x-www-form-urlencoded, which is written into HTML itself. Those are listed here as the canonical form, because correcting them to something no server accepts would be worse than useless.

[ THE MATHS ]
The ones written wrong most often
image/jpgdoes not exist — image/jpeg
audio/mp3does not exist — audio/mpeg
application/font-woff2superseded — font/woff2
text/htmlmissing charset=utf-8

The first two are written by hand every day and were never registered.

[ UNKNOWN CONTENT ]

Serve application/octet-stream. Browsers download it rather than trying to render it, which is the safe default. The dangerous failure is serving unknown content as something a browser will execute or display — so never guess a type from user-supplied input.

[ NEXT ]
72HTTP Status CodesThe other header you get wrong at 2am
44Base64 Encoder / DecoderFor a data URI, which needs the type too
43JSON FormatterThe type with no charset, and why
41QR Code GeneratorProduces PNG and SVG — both listed here
[ IMPORTANT ]

Based on the IANA media types registry and the mappings browsers and web servers actually use. Where the registry and common practice differ, the form browsers require is listed as canonical and the other as an alias. Nothing you type here is sent to our servers — the calculation runs entirely in your browser.