MIME Types in REST API Design

Content-Type and Accept headers are your API's format contract. Setting request types, content negotiation with Accept, and custom vendor MIME types with +json suffix.

ZERO UPLOAD · ALL LOCAL
  1. Type a MIME string (e.g. application/json), file extension (e.g. .wasm), or keyword (e.g. "protobuf") to search the database.
  2. Use the category pills (Application, Audio, Font, Image, Model, Text, Video, Multipart) to browse all types in a category.
  3. Click Details on any card to expand the description, spec link, and server configuration snippets in a full-width panel.
  4. Click Copy next to any snippet block to copy the Nginx, Apache, .htaccess, or Caddy directive to your clipboard.

Vendor MIME types with the +json suffix

  • JSON:API
  • RFC 9457 HTTP Problem Details
  • RFC 7396 JSON Merge Patch
  • Hypertext Application Language

The +json suffix (RFC 6838) tells a client the underlying representation is JSON regardless of which vendor type it's wrapped in.

APPLICATION (100 types)

application/json
.json
application/xml
.xml .xsl .xslt
application/pdf
.pdf
application/wasm
.wasm
application/javascript
.js .mjs .cjs
application/zip
.zip
application/gzip
.gz .tgz
application/x-tar
.tar
application/x-7z-compressed
.7z
application/vnd.rar
.rar
application/x-bzip2
.bz2
application/vnd.openxmlformats-officedocument.wordprocessingml.document
.docx
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xlsx
application/vnd.openxmlformats-officedocument.presentationml.presentation
.pptx
application/msword
.doc
application/vnd.ms-excel
.xls
application/vnd.ms-powerpoint
.ppt
application/octet-stream
.bin .exe .dll
application/x-www-form-urlencoded
application/cbor
.cbor
application/x-protobuf
.proto .pb
application/grpc
application/graphql-response+json
application/vnd.api+json
application/ld+json
.jsonld
application/hal+json
application/jwt
application/manifest+json
.webmanifest
application/rtf
.rtf
application/problem+json
application/json-patch+json
application/merge-patch+json
application/vnd.geo+json
.geojson
application/yaml
.yaml .yml
application/sql
.sql
application/epub+zip
.epub
application/java-archive
.jar
application/vnd.oasis.opendocument.text
.odt
application/vnd.oasis.opendocument.spreadsheet
.ods
application/vnd.oasis.opendocument.presentation
.odp
application/x-ndjson
.ndjson .jsonl
application/vnd.apple.mpegurl
.m3u8
application/dash+xml
.mpd
application/rss+xml
.rss
application/atom+xml
.atom
application/x-apple-diskimage
.dmg
application/x-debian-package
.deb
application/x-rpm
.rpm
application/x-sh
.sh
application/ecmascript
application/toml
.toml
application/zstd
.zst
application/x-xz
.xz
application/x-bzip
.bz
application/x-lzma
.lzma
application/x-iso9660-image
.iso
application/vnd.ms-cab-compressed
.cab
application/vnd.android.package-archive
.apk
application/x-msdownload
.msi
application/vnd.apple.installer+xml
.mpkg
application/x-httpd-cgi
.cgi
application/vnd.google-earth.kml+xml
.kml
application/vnd.google-earth.kmz
.kmz
application/vnd.sqlite3
.sqlite .sqlite3 .db
application/msgpack
.msgpack
application/schema+json
application/wsdl+xml
.wsdl
application/jose+json
application/x-pkcs12
.p12 .pfx
application/pkix-cert
.cer .der
application/x-pem-file
.pem .crt .key
application/pkcs8
.p8
application/pkcs10
.p10 .csr
application/postscript
.ps .eps .ai
application/x-latex
.latex .ltx
application/x-tex
.tex
application/x-dvi
.dvi
application/fits
.fits .fit .fts
application/vnd.oasis.opendocument.graphics
.odg
application/vnd.oasis.opendocument.chart
.odc
application/vnd.oasis.opendocument.formula
.odf
application/vnd.ms-project
.mpp .mpt
application/vnd.visio
.vsd .vst .vss .vsw
application/vnd.ms-access
.mdb
application/vnd.openxmlformats-officedocument.wordprocessingml.template
.dotx
application/vnd.ms-word.document.macroenabled.12
.docm
application/vnd.ms-excel.sheet.macroenabled.12
.xlsm
application/vnd.apple.pages
.pages
application/vnd.apple.numbers
.numbers
application/vnd.apple.keynote
.key
application/typescript
.ts
application/x-perl
.pl .pm
application/x-python-code
.pyc .pyo
application/x-csh
.csh
application/x-troff
.tr .roff .man
application/trig
.trig
application/n-triples
.nt
application/smil+xml
.smil .smi
application/vnd.mozilla.xul+xml
.xul
application/vnd.lotus-1-2-3
.123 .wks

AUDIO (23 types)

audio/mpeg
.mp3 .mpga
audio/ogg
.ogg .oga
audio/wav
.wav
audio/flac
.flac
audio/aac
.aac
audio/opus
.opus
audio/webm
.weba
audio/midi
.mid .midi
audio/mp4
.m4a .m4b .mp4a
audio/3gpp
.3gp .3gpp
audio/aiff
.aif .aiff
audio/x-ms-wma
.wma
audio/amr
.amr
audio/speex
.spx
audio/ac3
.ac3
audio/vorbis
audio/basic
.au .snd
audio/x-caf
.caf
audio/mpegurl
.m3u
audio/vnd.dts
.dts
audio/mp2
.mp2
audio/3gpp2
.3g2
audio/x-realaudio
.ra .ram

FONT (10 types)

font/woff
.woff
font/woff2
.woff2
font/ttf
.ttf
font/otf
.otf
application/vnd.ms-fontobject
.eot
font/collection
.ttc
font/sfnt
.sfnt
application/x-font-truetype
.ttf
application/x-font-opentype
.otf
application/x-font-woff
.woff

IMAGE (35 types)

image/jpeg
.jpg .jpeg .jfif
image/png
.png
image/gif
.gif
image/webp
.webp
image/avif
.avif
image/svg+xml
.svg .svgz
image/vnd.microsoft.icon
.ico
image/x-icon
.ico
image/bmp
.bmp
image/tiff
.tiff .tif
image/heic
.heic
image/heif
.heif
image/apng
.apng
image/jxl
.jxl
image/jp2
.jp2 .j2k .jpf
image/jpx
.jpx
image/vnd.djvu
.djvu .djv
image/vnd.adobe.photoshop
.psd
image/x-portable-bitmap
.pbm
image/x-portable-graymap
.pgm
image/x-portable-pixmap
.ppm
image/x-xcf
.xcf
image/ktx
.ktx
image/ktx2
.ktx2
image/x-exr
.exr
image/x-rgb
.rgb .rgba .sgi
image/x-xbitmap
.xbm
image/x-pcx
.pcx
image/vnd.wap.wbmp
.wbmp
image/x-tga
.tga .tpic
image/vnd.ms-photo
.jxr .hdp .wdp
image/x-win-bitmap
.cur
image/x-emf
.emf
image/wmf
.wmf
image/vnd.radiance
.hdr .rgbe

MODEL (19 types)

model/gltf+json
.gltf
model/gltf-binary
.glb
model/obj
.obj
model/stl
.stl
model/usd
.usd .usda .usdc
model/vnd.collada+xml
.dae
model/vnd.usdz+zip
.usdz
model/mtl
.mtl
model/vnd.dwf
.dwf
model/iges
.igs .iges
model/step
.stp .step .p21
model/step+xml
.stpx .stpxz
model/x3d+xml
.x3d
model/x3d+binary
.x3db .x3dbz
model/x3d-vrml
.x3dv .x3dvz
model/vnd.3mf
.3mf
model/vnd.fbx
.fbx
model/vnd.opengex
.ogex
model/JT
.jt

TEXT (33 types)

text/html
.html .htm
text/css
.css
text/csv
.csv
text/plain
.txt .text .conf .log
text/markdown
.md .markdown
text/calendar
.ics .ical .ifb
text/vcard
.vcf .vcard
text/javascript
.js
text/event-stream
text/tab-separated-values
.tsv
text/xml
.xml
text/x-python
.py .pyw
text/x-java-source
.java
text/x-c
.c .h
text/x-ruby
.rb
text/x-go
.go
text/x-rust
.rs
text/x-kotlin
.kt .kts
text/x-swift
.swift
text/x-scala
.scala .sc
text/x-php
.php .php3 .php4 .php5 .phtml
text/x-diff
.diff .patch
text/uri-list
.uri .urls .uris
text/x-rst
.rst
text/x-asciidoc
.adoc .asciidoc
text/x-nfo
.nfo
text/x-asm
.asm .s
text/troff
.roff .me .ms .mm
text/x-ini
.ini .cfg .inf
text/x-tcl
.tcl .tk
text/x-fortran
.f .f90 .for .f95
text/x-yaml
.yaml .yml
text/cache-manifest
.appcache .manifest

VIDEO (21 types)

video/mp4
.mp4 .m4v
video/webm
.webm
video/ogg
.ogv
video/x-msvideo
.avi
video/quicktime
.mov .qt
video/x-matroska
.mkv .mk3d
video/mp2t
.ts .mts .m2ts
video/mpeg
.mpeg .mpg
video/3gpp
.3gp .3gpp
video/3gpp2
.3g2 .3gp2
video/x-ms-wmv
.wmv
video/x-ms-asf
.asf .asx
video/vnd.avi
.avi
video/iso.segment
.m4s
video/x-dv
.dv .dif
video/x-ms-vob
.vob
video/H264
video/H265
video/AV1
video/x-flv
.flv
video/x-f4v
.f4v

MULTIPART (9 types)

multipart/form-data
multipart/byteranges
multipart/mixed
multipart/alternative
multipart/digest
multipart/related
multipart/signed
multipart/encrypted
multipart/report
No MIME types match your search.

MIME Types in REST API Design: Content-Type, Accept, and Vendor Types

Content-Type and Accept headers are your API's format contract. In HTTP, Content-Type describes the format of the body you are sending. Accept declares the format you expect in return. Together, they form the content negotiation mechanism that allows a single endpoint to serve multiple formats without separate URLs.1 For REST APIs that exclusively serve JSON, setting both headers explicitly in every request removes ambiguity about format expectations. Many APIs serve JSON by default regardless of Accept, but a well-designed API performs content negotiation and returns the format the client requested. Vendor-specific MIME types using the +json suffix pattern allow APIs to express their schema in the MIME type string itself, enabling clients and intermediaries to understand the structure without reading documentation.2 Building on this, versioning via MIME types using the vnd. prefix and a version parameter is an established alternative to URL-based API versioning.

Setting Content-Type on request bodies

When sending a request body, Content-Type declares the format of the data in that body. A POST request sending JSON must include Content-Type: application/json; otherwise the server may reject the body or misparse it.3 For form submissions, Content-Type: application/x-www-form-urlencoded or Content-Type: multipart/form-data are appropriate depending on whether binary data is included. An empty body (such as GET or DELETE requests without a body) should not include a Content-Type header at all, since the header implies a body is present.

Content-Type versus Accept for bodyless requests

Consequently, middleware that automatically appends Content-Type headers to all requests can cause issues with bodyless requests. Furthermore, the Content-Type header applies to the request body only; the Accept header governs the response format. Some developers confuse the two, setting Content-Type on a GET request and expecting it to control the response format, when Accept is the correct header for that purpose.

Content negotiation with Accept and q-values

The Accept header tells the server which response formats the client supports. A value of Accept: application/json requests a JSON response. Accept: */* accepts any format, which is the browser default. Multiple formats are expressed with comma separation and optional quality values: Accept: application/json, application/xml;q=0.9, */*;q=0.8. The q parameter ranges from 0 to 1; higher values are preferred. Servers that implement content negotiation read the Accept header and respond with the highest-preference format they support, setting the matching Content-Type on the response.

Strict versus lenient content negotiation

Strict content negotiation returns 406 Not Acceptable when no supported format matches the Accept header, which forces the client to handle the error and retry with a different format.3 Lenient negotiation ignores the Accept header entirely and returns a default format, typically JSON, which simplifies client code but breaks the content negotiation contract. Most public APIs use lenient negotiation for simplicity, but strict negotiation is more correct when clients explicitly declare supported formats and the server must respect that contract.

Custom vendor MIME types and the +json suffix pattern

RFC 6838 defines structured syntax suffixes for MIME types. The +json suffix indicates that a MIME type's underlying representation is JSON, regardless of the specific vendor type.4 application/vnd.api+json (JSON:API), application/problem+json (RFC 9457 HTTP problem details), and application/merge-patch+json (RFC 7396 JSON Merge Patch) are widely used examples. Vendor types with the vnd. prefix identify organisation or product-specific formats. Building on this, an API can version its format through the MIME type using the Accept and Content-Type headers: Accept: application/vnd.myapi.v2+json requests the v2 format without changing the URL. This approach avoids URL path versioning (/v1/, /v2/) at the cost of more complex header handling. Clients that do not support a specific version can fall back to application/json if the server allows it through its content negotiation logic.

Hypermedia API types and structured JSON media types

Beyond plain application/json, several structured media types layer specific schema conventions on top of JSON. Hypertext Application Language (HAL) defines a JSON structure where resources include _links and _embedded properties for hypermedia navigation; its registered media type is application/vnd.hal+json.5 JSON:API defines a strict response envelope with data, errors, and meta top-level properties; its registered type is application/vnd.api+json. Both formats allow API clients to discover related resources through typed links rather than relying on out-of-band documentation.

Choosing a hypermedia type commits your API to that format's conventions for pagination, relationship linking, and error encoding. application/problem+json (RFC 9457) is a narrower choice: it standardises only error responses, defining type, title, status, detail, and instance fields. Many APIs return application/json for success responses and application/problem+json for error responses, giving clients a predictable structure for error handling without requiring a full hypermedia framework for success payloads.

MIME type versioning as an alternative to URL versioning

The +json suffix pattern combined with the vnd. prefix allows API version information in the media type string itself.2 An API can negotiate Accept: application/vnd.myapi.v2+json to return a v2 response format at the same URL, avoiding URL path fragmentation such as /v1/ and /v2/. Version negotiation through media types requires clients to send the correct Accept header and handle 406 responses when requesting unsupported versions; it works best for APIs where different client versions must coexist for extended periods and where format changes are significant enough to warrant separate MIME type identifiers.

The trade-off is that clients must understand the versioning scheme embedded in the media type, whereas URL versioning is visible and easy to reason about from request logs alone. Teams choose media type versioning when they expect long-lived clients that cannot be forced to upgrade on a schedule. pick a registered +json vendor type rather than inventing a custom one.

When to use this

Use this guide when designing or auditing a REST API's content-type handling, implementing content negotiation, or choosing between URL versioning and MIME type versioning.

Examples

Fetch with explicit Content-Type and Accept headers

Always set both headers for API requests: Content-Type for the request body format and Accept for the expected response format.

Accept header with quality values for content negotiation

Express format preferences in order. The server responds with the highest-q format it supports.

Vendor MIME type with version in Accept header

Request a specific API version via MIME type instead of URL path versioning.

Sources
  1. 1.

    Mozilla Developer Network, "Content negotiation," developer.mozilla.org, accessed June 2026. https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Content_negotiation

  2. 2.

    Alexandre Allouin Pompey, "Media Type Specifications and Registration Procedures," RFC 6838, IETF, January 2013. https://www.rfc-editor.org/info/rfc6838/

  3. 3.

    Roy T. Fielding and Julian Reschke, "HTTP Semantics," RFC 9110, IETF, January 2024. https://www.rfc-editor.org/info/rfc9110/

  4. 4.

    "application/problem+json," IANA, iana.org, accessed June 2026. https://www.iana.org/assignments/media-types/application/problem+json

  5. 5.

    "application/vnd.api+json," IANA, iana.org, accessed June 2026. https://www.iana.org/assignments/media-types/application/vnd.api+json

FAQ