Back to all status codesRead more on MDN
400
Bad Request
Client Error
RFC 7231
The server cannot or will not process the request due to something that is perceived to be a client error.
Detailed Information
The 400 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).
Common Examples
- •Invalid syntax
- •Missing required fields
- •Invalid data formats
Common Uses
- •API requests with invalid input
- •Form submissions with errors
- •Invalid requests to web pages
Best Practices
- •Validate client input server-side
- •Provide helpful error messages
- •Use appropriate response body structure