HTTP 400 Bad Request: What It Means and When You See It
Quick Answer
HTTP 400 Bad Request means the server cannot process the request due to a client error — malformed syntax, invalid request message framing, or deceptive request routing.
Common Causes of HTTP 400
HTTP 400 Bad Request is returned when the server cannot process the request due to client error. Common causes: malformed JSON in the request body (missing closing bracket, trailing comma), wrong Content-Type header (sending JSON with text/plain), missing required query parameters, invalid URL encoding, request headers that are too large (cookie overflow), and HTTP/2 protocol violations. Check the request body format, headers, and URL structure first.
Fixing HTTP 400 Errors
Validate JSON before sending: JSON.parse(body) in JavaScript, json.loads(body) in Python. Check Content-Type matches the body format: application/json for JSON, multipart/form-data for file uploads. Verify all required fields are present and correctly typed. In curl: curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' URL. If the API returns a 400, read the response body - most APIs include a message or errors field explaining what was wrong.
Try the interactive tool
Convert any value instantly — no sign-up required
Frequently Asked Questions
Related Values
100
HTTP 100 Continue means the server has received the request headers and the client should proceed to send the request body. It is an interim response used to inform the client to continue.
101
HTTP 101 Switching Protocols indicates the server is switching to the protocol specified in the Upgrade header field. Commonly used when upgrading to WebSocket connections.
200
HTTP 200 OK is the standard success response. The request has succeeded and the server has returned the requested resource in the response body.
201
HTTP 201 Created means the request succeeded and a new resource was created as a result. The Location header typically points to the new resource URL.