Content-Type Header

The Content-Type HTTP header is used to indicate the type of media in the body of the message.

For example, when a file is sent to the server, the Content-Type header indicates the file format (for example, Content-Type: image/png). For JSON strings the Content-Type will be application/json, for XML strings the Content-Type will be application/xml, etc.

An example of an HTTP request sending JSON string to the server. The 'Content-Type: application/json' header tells the server that the request body contains a JSON string.

Client Request with Content-Type Header Live Request
POST /echo/post/json HTTP/1.1
Accept: application/json
Content-Type: application/json
Content-Length: 16

{"key": "value"}

When the server responds with a JSON string, it tells the client that the message body contains JSON string with 'Content-Type: application/json' header.

Server Response with Content-Type Header Live Request
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 19


HTTP headers Content-Type requires certain directives such as Multipurpose Internet Mail Extensions (MIME) type of the data; Charset encoding standard in which the data will be received by the browsers; and the boundary directive when there are multipart entities that consist of 70 characters from a set of characters. These characters are known to be very robust through email gateways, and with no white space.

Possible values of HTTP Content-Type headers are listed below.


  • application/EDI-X12
  • application/EDIFACT
  • application/javascript
  • application/octet-stream
  • application/ogg
  • application/pdf
  • application/xhtml+xml
  • application/x-shockwave-flash
  • application/json
  • application/ld+json
  • application/xml
  • application/zip
  • application/x-www-form-urlencoded


  • audio/mpeg
  • audio/x-ms-wma
  • audio/vnd.rn-realaudio
  • audio/x-wav


  • image/gif
  • image/jpeg
  • image/png
  • image/tiff
  • image/
  • image/x-icon
  • image/vnd.djvu
  • image/svg+xml


  • multipart/mixed
  • multipart/alternative
  • multipart/related (using by MHTML (HTML mail).)
  • multipart/form-data


  • text/css
  • text/csv
  • text/html
  • text/javascript (obsolete)
  • text/plain
  • text/xml


  • video/mpeg
  • video/mp4
  • video/quicktime
  • video/x-ms-wmv
  • video/x-msvideo
  • video/x-flv
  • video/webm


  • application/vnd.oasis.opendocument.text
  • application/vnd.oasis.opendocument.spreadsheet
  • application/vnd.oasis.opendocument.presentation
  • application/
  • application/
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • application/
  • application/vnd.openxmlformats-officedocument.presentationml.presentation
  • application/msword
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/vnd.mozilla.xul+xml

Post HTTP Requests Online