application/json

All MIME types
Application · Standards tree · RFC 8259.json .map

Media type / application

application/json

The default structured payload of the web. JSON text is always UTF-8, which is why the type registers no charset parameter at all.

Served inline: Browsers have no renderer for this, so it downloads even without a Content-Disposition header. That makes it the quiet default for anything you do not want opened in place.

Browser behaviour

Downloads

Charset

charset ignored

Compression

Compress in transit

Send it like this

Content-Type: application/json

The format defines its own encoding, so no charset parameter is registered for this type. Sending one is harmless, but receivers are required to ignore it — it is not doing what people think it does.

Handling verdict

InlineDownloads

Browsers have no renderer for this, so it downloads even without a Content-Disposition header. That makes it the quiet default for anything you do not want opened in place.

Charsetcharset ignored

The format defines its own encoding, so no charset parameter is registered for this type. Sending one is harmless, but receivers are required to ignore it — it is not doing what people think it does.

CompressionCompress in transit

The payload is text-like or otherwise repetitive, so gzip or Brotli removes real bytes. Enable it at the server or CDN.

NameStandards tree

Registered with IANA through a public review process, so the name is stable and every implementation can rely on it meaning the same thing.

Anatomy of the name

RFC 6838

Top-level type

application

Application

Subtype

json

Registered in the standards tree.

Structured syntax

none

No suffix, so the payload format is defined entirely by the subtype itself.

Parameters

none

Beyond the charset rule above, this type defines no parameters of its own.

What trips people up

2 notes
  • `application/json; charset=utf-8` is harmless but meaningless — no charset parameter is defined, and receivers are required to ignore it.
  • Browsers download rather than render JSON, so an API opened in a tab prompting a save dialog is correct behaviour, not a bug.

Response headers

Content-Type: application/json
X-Content-Type-Options: nosniff
Content-Disposition: attachment; filename="example.json"
Vary: Accept-Encoding

nosniff stops the browser second-guessing the type you declared, which is what makes the rest of this reliable. Content-Disposition: attachment names the saved file and removes any doubt about rendering.

Server configuration

extension mapping

nginx

types {
    application/json  json map;
}

Apache

AddType application/json .json .map

Caddy

@type path *.json *.map
header @type Content-Type "application/json"

Extensions and other spellings

with signature

File extensions

File signature

7B (open brace) or 5B (open bracket)

Check these bytes rather than the client-supplied Content-Type when validating an upload. The header is a claim; the signature is evidence.

Related media types

8
Familyapplication
Treestandards
Suffix
Inlinedownload