Error fix
How to fix “400 Bad Request”
The server cannot process the request—malformed syntax, bad JSON, or invalid parameters.
Updated Apr 20, 2026
Tools that help with this
Fastest fix
Start here first. Step 1 fixes most cases—then work down the list.
- Compare your payload with API docs and fix required fields.
- Validate JSON with a linter; set Content-Type: application/json.
- Log server-side validation errors to see exact field failures.
What this means
400 means the server rejected the request before business logic—usually validation, parsing, or header issues.
Common causes
Invalid JSON or encoding
Truncated body, wrong Content-Type, or invalid UTF-8.
Bad query or path
Parameters fail schema validation or required fields are missing.
Step-by-step fix
Fix the request shape
- Compare your payload with API docs and fix required fields.
- Validate JSON with a linter; set Content-Type: application/json.
- Log server-side validation errors to see exact field failures.
Related
Also see: 400 — browse the HTTP status hub.
FAQ
- 400 vs 422?
- 400 is generic bad request; 422 often means syntactically fine but semantically invalid (API-dependent).
- 400 only from one client?
- Compare headers and body serialization between clients.
- GET with body?
- Some stacks reject bodies on GET—use POST or query params.
Fix related issues
Still stuck? Try these related fixes next.
- Kubernetes CrashLoopBackOffThe container exits repeatedly—check logs, probes, and resource limits.
- Heroku H10 — app crashedThe web process exited; Heroku serves an error page. Logs show the real exception.
- Netlify — page not foundThe deploy exists but no asset matches the path—often SPA routing or a missing file in publish dir.
- Vercel — deployment not foundThe deployment URL or project alias does not exist or was removed.
- Cloudflare 525 — SSL handshake failedCloudflare could not complete TLS with your origin—cert mismatch, wrong port, or TLS version.
Edit your error
Tweak the message and run again—we'll match an existing fix or generate a new page.
Original error message
400 Bad Request
