Skip to main content

application/json

application

The standard MIME type for JSON-encoded data. Used in REST API request and response bodies, webhook payloads, and configuration files. Always specify charset=utf-8 even though RFC 8259 mandates UTF-8 for JSON – some parsers need it explicit.

Details

application/json is defined by RFC 8259 and registered with IANA. It is the de facto standard for API communication.

HTTP usage: Request: Content-Type: application/json (with JSON body) Response: Content-Type: application/json;charset=utf-8 Request: Accept: application/json

Charset: RFC 8259 mandates UTF-8 for JSON. In practice, always include charset=utf-8 to avoid ambiguity with parsers that default to ISO-8859-1 for unspecified charsets.

Common mistakes: - text/json: not a registered IANA type – use application/json - application/x-json: legacy, use application/json - Missing Content-Type on POST/PUT requests causes 415 Unsupported Media Type

Common use

REST API bodies, webhook payloads, configuration files, GraphQL responses

See Also