MIME Types Reference

application/json

The standard MIME type for JavaScript Object Notation (JSON) data interchange.

What Is This?

The application/json MIME type indicates that the content being transmitted is JavaScript Object Notation (JSON) data. It is the most widely used content type for REST APIs, configuration files, and data interchange on the web. When a server sends application/json, the client knows to parse the response body as JSON rather than plain text or HTML.

Common Uses

1

REST and GraphQL API request and response bodies

2

Configuration files (package.json, tsconfig.json)

3

Browser localStorage and sessionStorage data serialization

4

WebSocket message payloads

Examples

Browser Support

Supported by all browsers. Modern browsers have native JSON.parse() and JSON.stringify() methods for handling application/json responses.

File Extension

The .json file extension maps to application/json as its MIME type.

Related Entries

More from this reference:

Frequently Asked Questions

Do I need to set application/json for every API response?

Yes. Always set Content-Type: application/json on JSON API responses. Without it, clients may not parse the response correctly and some browsers show a download prompt instead of processing the data.

What happens if I send application/json with invalid JSON?

The client will fail to parse the response and throw a JSON parse error. Always validate JSON before sending it with application/json content type.