HTTP 400 Bad Request

The server cannot process the request due to a client error.

4xx Client Error

400

Bad Request

Description

The 400 Bad Request status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). The client should not repeat the request without modifications. This is a generic client-side error status that is used when no other 4xx error code is appropriate. It can indicate issues like invalid JSON in the request body, missing required parameters, invalid query string formatting, request headers that are too large, or any other violation of the expected request format.

When Is It Used?

Returned when the client sends a request the server cannot understand. Common causes include malformed JSON in the request body, missing required fields, invalid data types (string where number expected), or badly formatted query parameters.

Example Response

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

{"error": "Invalid JSON", "message": "Unexpected token at position 15"}

Look Up Any Status Code

Browse all status codes