MIME types
What to put in Content-Type, and what happens when it is wrong.
- types
- 50
Output
html htm text/html
A web page. Always with charset=utf-8.
css text/css
js mjs text/javascript
application/javascript is obsolete but still served everywhere.
json application/json
No charset parameter: JSON is UTF-8 by definition.
xml application/xml
text/xml is also registered and means the same to browsers.
txt text/plain
csv text/csv
md text/markdown
yaml yml application/yaml
Registered in 2024; text/yaml is what older servers send.
pdf application/pdf
zip application/zip
gz application/gzip
tar application/x-tar
7z application/x-7z-compressed
rar application/vnd.rar
png image/png
jpg jpeg image/jpeg
Note the type is jpeg even when the extension is jpg.
gif image/gif
webp image/webp
avif image/avif
svg image/svg+xml
Served as anything else, a browser will not render it.
ico image/x-icon
image/vnd.microsoft.icon is the registered one; both work.
bmp image/bmp
tif tiff image/tiff
heic image/heic
mp4 m4v video/mp4
webm video/webm
mov video/quicktime
mp3 audio/mpeg
Not audio/mp3, which is not registered.
m4a audio/mp4
wav audio/wav
audio/x-wav and audio/wave appear in the wild too.
ogg oga audio/ogg
flac audio/flac
woff2 font/woff2
woff font/woff
ttf font/ttf
otf font/otf
wasm application/wasm
Must be exact or streaming compilation refuses it.
doc application/msword
docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
xls application/vnd.ms-excel
xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
ppt application/vnd.ms-powerpoint
pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
epub application/epub+zip
ics text/calendar
vcf text/vcard
srt application/x-subrip
vtt text/vtt
Must be exact or the browser ignores the track.
bin application/octet-stream
The fallback: bytes with nothing said about them.Your files stay on your device
This tool runs entirely in your browser. What you paste is processed on your device and is never sent to a server, so it is safe to use with tokens, keys and unpublished text.
How it works
- Leave the box empty for the list.
- Type an extension — png, or .png — for its type.
- Type part of a type, like image/, for everything under it.
- Read the notes: a few of these fail quietly rather than loudly.
Frequently asked questions
- Which ones actually matter?
- The ones a browser refuses to act on when they are wrong. An SVG served as text/plain does not render. A WebAssembly module served as anything but application/wasm cannot be streamed. A .vtt subtitle track served as text/plain is ignored, and the video plays with no captions and no error.
- Is it text/javascript or application/javascript?
- text/javascript. application/javascript was the recommendation for years and is now obsolete, but both work everywhere and you will keep seeing the old one.
- Should I add charset=utf-8?
- To text/html and text/plain, yes. Not to application/json — JSON is UTF-8 by definition and a charset parameter on it is meaningless, though harmless.
- What is application/octet-stream?
- “Some bytes, and I am not going to tell you what they are.” It is the right answer when you genuinely do not know, and it makes a browser download rather than display.
- Is anything sent to a server?
- No. It runs in your browser, so what you paste stays on your computer.
Related tools
⛶ HTTP status codes What the number means, and when to send it. ∿ Image tools Image to base64 A picture you can paste into a stylesheet. 字 Converters Convert text encoding Fix a CSV that opens garbled, or save one in the encoding a system asks for. Detected automatically, converted in your browser. ‹› HTML formatter Indented so you can read it, or squeezed so you can ship it.