MIME Types Cheatsheet - Content-Type Reference

A wrong Content-Type is often the invisible cause of broken downloads, garbled pages and rejected uploads. Organized by file category, each media type maps to extensions, the correct Content-Type string and charset notes. Use it to configure Nginx mime.types, set response Content-Type in server code, and validate what a browser infers from the header. After reading you know why .wasm or .woff2 serves wrong and how to fix it.

Reference·47 commands·Last updated 2026-07-21
mimecontent-typehttp

Text Types 8

text/html
.html HTML 文档
text/css
.css 样式表
text/javascript
.js JavaScript
text/plain
.txt 纯文本
text/xml
.xml XML 文档
text/csv
.csv CSV File
text/markdown
.md Markdown 文档
text/event-stream
SSE Service器推送事件流

Image Types 7

image/jpeg
.jpg/.jpeg JPEG 图片
image/png
.png PNG 图片
image/gif
.gif GIF 动图
image/svg+xml
.svg SVG 矢量图
image/webp
.webp WebP 图片
image/avif
.avif AVIF 图片(新一代Compress格式)
image/x-icon
.ico 图标

Audio/Video Types 7

audio/mpeg
.mp3 MP3 音频
audio/wav
.wav WAV 音频
audio/ogg
.ogg OGG 音频
audio/aac
.aac AAC 音频
video/mp4
.mp4 MP4 视频
video/webm
.webm WebM 视频
video/quicktime
.mov MOV 视频

Apps & Data Types 9

application/json
.json JSON 数据
application/xml
.xml XML 数据
application/javascript
.js JavaScript(传统type)
application/octet-stream
二进制流(默认下载)
application/x-www-form-urlencoded
表单提交(默认)
multipart/form-data
File上传
application/wasm
.wasm WebAssembly module
application/graphql
GraphQL 查询request体
application/ld+json
JSON-LD 结构化数据(SEO)

Document Types 6

application/pdf
.pdf PDF 文档
application/msword
.doc Word 文档(旧)
application/vnd.openxmlformats-officedocument.wordprocessingml.document
.docx Word 文档(新)
application/vnd.ms-excel
.xls Excel 表格(旧)
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xlsx Excel 表格(新)
application/vnd.openxmlformats-officedocument.presentationml.presentation
.pptx PowerPoint 演示

Compression Types 6

application/zip
.zip ZIP Compresspackage
application/gzip
.gz GZIP Compresspackage
application/x-tar
.tar TAR 归档
application/x-bzip2
.bz2 BZIP2 Compresspackage
application/x-7z-compressed
.7z 7Z Compresspackage
application/x-rar-compressed
.rar RAR Compresspackage

Font Types 4

font/woff
.woff WOFF 字体
font/woff2
.woff2 WOFF2 字体
font/ttf
.ttf TTF 字体
font/otf
.otf OTF 字体

Tips

  • Nginx MIME types live in /etc/nginx/mime.types.
  • For file uploads set Content-Type to multipart/form-data; the browser handles boundaries.
  • JSON API responses should set Content-Type to application/json; charset=utf-8.
  • octet-stream triggers a browser download — use for unknown or forced-download types.

Official References

Each command links to its official documentation below, so you can verify the latest usage and read deeper.

Maintained by LaoHand

Publicly updated on Jul 21, 2026, continuously proofread against official docs.

Contact Us

Wrong command or description? Send us corrections, business inquiries or product feedback by email.

Contact Us