What is the correct JSON content type?


You have seen so many purported “standards” for the JSON content type:

application/jsonapplication/x-javascripttext/javascripttext/x-javascripttext/x-json

But which is correct, or best?


In this article will discuss which one we should use:

For JSON text:

The MIME media type for JSON text is application/json. The default encoding is UTF-8. (Source: RFC 4627).

IANA has registered the official MIME Type for JSON as application/json.

When asked about why not text/json, Crockford seems to have said JSON is not really JavaScript nor text and also IANA was more likely to hand out application/* than text/*.


For JSON:

Content-Type: application/json

For JSON-P:

Content-Type: application/javascript

Here are some blog posts that were mentioned in the comments that are relevant