Media type · application/json

application/json

application/json is the media type for JSON documents exchanged between clients and servers.

Key facts

Typeapplication/json
Extensions.json
StandardRFC 8259; IANA registry
Text or binaryText (UTF-8 required)
Charset parameterNot defined by the standard

What application/json is

It identifies a JSON text as defined by RFC 8259. JSON exchanged between systems must be encoded in UTF-8, so the standard does not define a charset parameter; adding one is unnecessary and some strict parsers reject it. The type is used for API requests and responses, configuration files and embedded data.

Why a JSON request returns 400

The most common causes are a body that is not valid JSON (trailing commas, single quotes, unquoted keys), a missing Content-Type: application/json header so the server parses it as form data, or a charset declaration the parser refuses. Validate the exact bytes with a JSON formatter before blaming the server. On the response side, check that the server is not returning HTML error pages with a 200 status — a parser expecting JSON will fail on the first <.

Frequently asked questions

Should application/json include charset=utf-8?

The JSON standard fixes the encoding to UTF-8, so the parameter is not needed. Some APIs send it anyway; a strict parser may ignore or reject it.

Is JSON always UTF-8?

For interchange, yes. RFC 8259 requires UTF-8 for JSON exchanged between systems, even though the grammar itself is Unicode-based.

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.