400 Bad Request

HTTP 400 Bad Request is a 4xx client error status. The server cannot process the request because it is malformed or invalid.

400Status code
4xxClient error
NoCacheable by default
RFC 9110 §15.5.1Defined in

Common causes

What to do

Validate the request body and query string. For browsers, clearing cookies for the site often fixes a stubborn 400.

Example response

HTTP/1.1 400 Bad Request
Content-Type: application/problem+json

{"status":400,"title":"Bad Request"}

Returning 400 in code

Express   res.status(400).json({ … });
Flask     return jsonify(…), 400
PHP       http_response_code(400);
Go        w.WriteHeader(400)
nginx     return 400;

Other 4xx codes

Frequently asked questions

What does HTTP 400 mean?
The server cannot process the request because it is malformed or invalid.
Is 400 an error?
Yes. It is a client error: the request needs to change before retrying.
Does a 400 hurt SEO?
If search engines see it repeatedly on pages that should rank, those pages can be dropped from the index. Fix it quickly.