← All headersGeneral header

What is a Content-Type header?

The MIME type of the body, such as application/json or text/html, telling the receiver how to interpret it.

Content-Type is arguably the most important response header on the web - it's what tells the browser whether to render a page as HTML, parse a payload as JSON, or run a script, and getting it wrong can break a page outright or, in the worst case, open the door to content-sniffing security issues. Because it's so foundational, checking that a website's endpoints keep returning the right Content-Type is a natural thing to fold into routine uptime monitoring alongside status codes and response times.

Common use case

An API sets Content-Type: application/json on every response so client libraries know to parse the body as JSON rather than guessing from the content itself.

Example

Content-Type: text/html; charset=utf-8

History

Adapted from MIME email standards (RFC 1521, 1993) into HTTP in the original HTTP/1.0 specification, RFC 1945 (1996).

Did you know?

The charset parameter on this header is what ultimately decides whether special characters like emoji or accented letters render correctly or turn into garbled mojibake.