MIME Types Reference JSON Example
A structured JSON reference of the most common MIME types (media types) grouped by category — covering text, application, image, audio, video, and font types with file extensions and descriptions.
{
"mimeTypes": [
{
"type": "text",
"subtype": "plain",
"fullType": "text/plain",
"extensions": [
".txt",
".text"
],
"description": "Plain unformatted text with no markup or styling."
},
{
"type": "text",
"subtype": "html",
"fullType": "text/html",
"extensions": [
".html",
".htm"
],
"description": "HyperText Markup Language document for web browsers."
},
{
"type": "text",
"subtype": "css",
"fullType": "text/css",
"extensions": [
".css"
],
"description": "Cascading Style Sheet for styling HTML documents."
},
{
"type": "text",
"subtype": "csv",
"fullType": "text/csv",
"extensions": [
".csv"
],
"description": "Comma-separated values for tabular data interchange."
},
{
"type": "text",
"subtype": "javascript",
"fullType": "text/javascript",
"extensions": [
".js",
".mjs"
],
"description": "JavaScript source code — the IANA-registered type for JS modules."
},
{
"type": "text",
"subtype": "xml",
"fullType": "text/xml",
"extensions": [
".xml"
],
"description": "Extensible Markup Language when intended for human reading."
},
{
"type": "text",
"subtype": "markdown",
"fullType": "text/markdown",
"extensions": [
".md",
".markdown"
],
"description": "Markdown-formatted text document."
},
{
"type": "application",
"subtype": "json",
"fullType": "application/json",
"extensions": [
".json"
],
"description": "JSON-encoded data — the standard content type for REST API payloads."
},
{
"type": "application",
"subtype": "xml",
"fullType": "application/xml",
"extensions": [
".xml"
],
"description": "XML data intended for machine processing rather than direct display."
},
{
"type": "application",
"subtype": "pdf",
"fullType": "application/pdf",
"extensions": [
".pdf"
],
"description": "Portable Document Format for fixed-layout documents."
},
{
"type": "application",
"subtype": "zip",
"fullType": "application/zip",
"extensions": [
".zip"
],
"description": "ZIP archive containing one or more compressed files."
},
{
"type": "application",
"subtype": "gzip",
"fullType": "application/gzip",
"extensions": [
".gz",
".gzip"
],
"description": "Gzip-compressed data stream."
},
{
"type": "application",
"subtype": "octet-stream",
"fullType": "application/octet-stream",
"extensions": [],
"description": "Arbitrary binary data — the generic fallback for unknown file types."
},
{
"type": "application",
"subtype": "x-www-form-urlencoded",
"fullType": "application/x-www-form-urlencoded",
"extensions": [],
"description": "HTML form data encoded as URL query parameters (key=value&key2=value2)."
},
{
"type": "application",
"subtype": "javascript",
"fullType": "application/javascript",
"extensions": [
".js"
],
"description": "JavaScript — legacy MIME type superseded by text/javascript."
},
{
"type": "application",
"subtype": "wasm",
"fullType": "application/wasm",
"extensions": [
".wasm"
],
"description": "WebAssembly binary module for execution in the browser or Node.js."
},
{
"type": "application",
"subtype": "ld+json",
"fullType": "application/ld+json",
"extensions": [
".jsonld"
],
"description": "JSON-LD linked data document for structured data markup (Schema.org)."
},
{
"type": "application",
"subtype": "vnd.ms-excel",
"fullType": "application/vnd.ms-excel",
"extensions": [
".xls"
],
"description": "Microsoft Excel spreadsheet (legacy binary format)."
},
{
"type": "application",
"subtype": "vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"fullType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"extensions": [
".xlsx"
],
"description": "Microsoft Excel spreadsheet (modern Office Open XML format)."
},
{
"type": "image",
"subtype": "jpeg",
"fullType": "image/jpeg",
"extensions": [
".jpg",
".jpeg"
],
"description": "JPEG compressed raster image — best for photographs."
},
{
"type": "image",
"subtype": "png",
"fullType": "image/png",
"extensions": [
".png"
],
"description": "PNG lossless raster image with transparency support."
},
{
"type": "image",
"subtype": "gif",
"fullType": "image/gif",
"extensions": [
".gif"
],
"description": "GIF image supporting basic animation and 256-colour palette."
},
{
"type": "image",
"subtype": "webp",
"fullType": "image/webp",
"extensions": [
".webp"
],
"description": "WebP modern image format offering superior compression over JPEG and PNG."
},
{
"type": "image",
"subtype": "svg+xml",
"fullType": "image/svg+xml",
"extensions": [
".svg"
],
"description": "Scalable Vector Graphics — XML-based resolution-independent image format."
},
{
"type": "image",
"subtype": "x-icon",
"fullType": "image/x-icon",
"extensions": [
".ico"
],
"description": "ICO format used for browser favicons."
},
{
"type": "image",
"subtype": "avif",
"fullType": "image/avif",
"extensions": [
".avif"
],
"description": "AVIF next-generation image format with high compression efficiency."
},
{
"type": "audio",
"subtype": "mpeg",
"fullType": "audio/mpeg",
"extensions": [
".mp3"
],
"description": "MP3 compressed audio — the most widely supported audio format."
},
{
"type": "audio",
"subtype": "wav",
"fullType": "audio/wav",
"extensions": [
".wav"
],
"description": "Waveform Audio File Format — uncompressed PCM audio."
},
{
"type": "audio",
"subtype": "ogg",
"fullType": "audio/ogg",
"extensions": [
".ogg"
],
"description": "Ogg container with Vorbis or Opus audio codec."
},
{
"type": "audio",
"subtype": "mp4",
"fullType": "audio/mp4",
"extensions": [
".m4a"
],
"description": "MPEG-4 audio container typically used for AAC-encoded audio."
},
{
"type": "audio",
"subtype": "webm",
"fullType": "audio/webm",
"extensions": [
".webm"
],
"description": "WebM audio container using Opus codec."
},
{
"type": "video",
"subtype": "mp4",
"fullType": "video/mp4",
"extensions": [
".mp4",
".m4v"
],
"description": "MPEG-4 video — the most universally supported video format on the web."
},
{
"type": "video",
"subtype": "webm",
"fullType": "video/webm",
"extensions": [
".webm"
],
"description": "WebM open video format using VP8/VP9 or AV1 codec."
},
{
"type": "video",
"subtype": "ogg",
"fullType": "video/ogg",
"extensions": [
".ogv"
],
"description": "Ogg container with Theora video codec."
},
{
"type": "video",
"subtype": "quicktime",
"fullType": "video/quicktime",
"extensions": [
".mov"
],
"description": "Apple QuickTime video container format."
},
{
"type": "font",
"subtype": "woff2",
"fullType": "font/woff2",
"extensions": [
".woff2"
],
"description": "Web Open Font Format 2 — the preferred web font format with Brotli compression."
},
{
"type": "font",
"subtype": "woff",
"fullType": "font/woff",
"extensions": [
".woff"
],
"description": "Web Open Font Format 1 — legacy web font format."
},
{
"type": "font",
"subtype": "ttf",
"fullType": "font/ttf",
"extensions": [
".ttf"
],
"description": "TrueType font file — supported by all modern browsers."
}
]
}Field Reference
typerequiredstringPrimary MIME type category: text, application, image, audio, video, or fontsubtyperequiredstringMIME subtype identifying the specific format (e.g. 'json', 'jpeg')fullTyperequiredstringComplete MIME type string in type/subtype format used in HTTP headersextensionsrequiredstring[]Common file extensions associated with this MIME type (may be empty for inline types)descriptionrequiredstringOne-sentence description of the format and its primary use caseVariants
{
"mimeTypes": [
{
"type": "text",
"subtype": "html",
"fullType": "text/html",
"extensions": [
".html",
".htm"
],
"description": "HyperText Markup Language document for web browsers."
},
{
"type": "text",
"subtype": "css",
"fullType": "text/css",
"extensions": [
".css"
],
"description": "Cascading Style Sheet for styling HTML documents."
},
{
"type": "text",
"subtype": "javascript",
"fullType": "text/javascript",
"extensions": [
".js",
".mjs"
],
"description": "JavaScript source code."
},
{
"type": "application",
"subtype": "json",
"fullType": "application/json",
"extensions": [
".json"
],
"description": "JSON-encoded data — standard content type for REST API payloads."
},
{
"type": "image",
"subtype": "jpeg",
"fullType": "image/jpeg",
"extensions": [
".jpg",
".jpeg"
],
"description": "JPEG compressed raster image."
},
{
"type": "image",
"subtype": "png",
"fullType": "image/png",
"extensions": [
".png"
],
"description": "PNG lossless raster image with transparency support."
},
{
"type": "image",
"subtype": "webp",
"fullType": "image/webp",
"extensions": [
".webp"
],
"description": "WebP modern image format."
},
{
"type": "image",
"subtype": "svg+xml",
"fullType": "image/svg+xml",
"extensions": [
".svg"
],
"description": "Scalable Vector Graphics."
},
{
"type": "font",
"subtype": "woff2",
"fullType": "font/woff2",
"extensions": [
".woff2"
],
"description": "Web Open Font Format 2."
}
]
}{
"mimeTypes": [
{
"type": "application",
"subtype": "json",
"fullType": "application/json",
"extensions": [
".json"
],
"description": "JSON-encoded data — standard content type for REST API payloads."
},
{
"type": "application",
"subtype": "xml",
"fullType": "application/xml",
"extensions": [
".xml"
],
"description": "XML data for machine processing."
},
{
"type": "application",
"subtype": "x-www-form-urlencoded",
"fullType": "application/x-www-form-urlencoded",
"extensions": [],
"description": "HTML form data encoded as URL query parameters."
},
{
"type": "text",
"subtype": "plain",
"fullType": "text/plain",
"extensions": [
".txt"
],
"description": "Plain text response body."
},
{
"type": "application",
"subtype": "octet-stream",
"fullType": "application/octet-stream",
"extensions": [],
"description": "Arbitrary binary data for file download responses."
}
]
}Common Use Cases
- →Setting HTTP Content-Type response headers in web servers and API frameworks
- →File upload validation — reject uploads whose MIME type is not in an allowlist
- →API response headers — ensure clients parse the body with the correct decoder
- →File type detection — map a file's extension to its MIME type for serving static assets
- →Web server configuration (nginx, Apache) — map extensions to Content-Type for correct browser handling
Validate or format this JSON
One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.
Frequently Asked Questions
MIME (Multipurpose Internet Mail Extensions) types, also called media types, are standardized identifiers that describe the format of data in an HTTP body or email attachment. They follow the pattern type/subtype (e.g. image/jpeg). Browsers and HTTP clients use them to decide how to process or display the content.
In Express.js: res.setHeader('Content-Type', 'application/json'). In Next.js API routes: return NextResponse.json(data) sets it automatically. In fetch: the response headers are read-only — the server controls Content-Type. For file downloads, pair Content-Type with Content-Disposition: attachment; filename='file.pdf'.
Use application/json. This is the IANA-registered type and is universally recognized by browsers, HTTP clients, and API gateways. Older systems sometimes used text/plain to avoid CORS preflight, but this is no longer recommended. Never use text/json — it is non-standard.
text/javascript is the current IANA-registered MIME type for JavaScript (RFC 9239, 2022). application/javascript was the previous standard and is still accepted everywhere, but text/javascript is now preferred. Both work identically in all modern browsers. For new code, use text/javascript in Content-Type headers.