4xx Client error

HTTP 400 Bad Request

The server cannot process the request because of malformed syntax, invalid framing or a bad parameter.

400 Bad Request means the server could not process the request because the client sent something malformed: invalid syntax, a broken body or a parameter the server cannot read.

HTTP/1.1 400 Bad Request

Common causes

  • Invalid JSON in the body, or a body that does not match the Content-Type header.
  • Missing or wrongly typed parameters, or an invalid query string.
  • Oversized or corrupted cookies and headers, which some servers report as 400.

How to fix it

  • Read the response body: most APIs explain which field is wrong.
  • Validate the JSON you send and check that Content-Type matches it.
  • In a browser, clearing the site's cookies often fixes a 400 on every page.

Related status codes

Other status codes

1xx Informational

2xx Success

3xx Redirection

5xx Server error

Search all HTTP status codes