Malformed syntax
Invalid JSON, an unescaped character in the URL, or a body that does not match its declared content type.
Monitor
Protect
Manage
By role
Security
Renewals
Monitoring
A 400 Bad Request means the server refuses to process the request because it considers it malformed: bad syntax, invalid message framing or deceptive routing. Resending the identical request fails again, so change something: the URL, the cookies, or the request body.
MDN names three causes: malformed syntax, invalid message framing, and deceptive request routing.
Invalid JSON, an unescaped character in the URL, or a body that does not match its declared content type.
A Content-Length that does not match the body, or a broken chunked encoding.
A request whose Host or target conflicts, which servers reject as unsafe.
Illegal characters, a broken percent-encoding, or a URL cut off when pasted.
Some servers reject requests whose headers or cookies exceed their limits. Limits vary by server.
Many APIs return 400 for a missing field or wrong type, with the reason in the body.
Retype the URL and remove odd characters, spaces or a trailing fragment pasted from elsewhere.
A corrupt or oversized cookie can make every request to one site fail. Clear that site only.
If it loads there, an extension or a stored cookie is the cause.
If it happens on a file upload, test with a smaller file or a different format.
If nothing helps, send the owner the URL, the time and what you did before the error.
# verbose: shows the request headers sent and the response
curl -v -X POST https://api.example.com/users \
-H "Content-Type: application/json" \
-d '{"email":"b@example.com","username":"b.smith"}'
# the response body usually names the invalid fieldMDN notes that repeating the same request without changes fails again. Compare the failing request with a working one and change one thing at a time.
| Code | Problem | Fix on your side |
|---|---|---|
| 400 | The request itself is malformed | Correct the request |
| 401 | No valid authentication | Log in or send a token |
| 403 | Refused despite known identity | Ask for access |
| 404 | Nothing at that URL | Fix or redirect the URL |
It means the server will not process the request because it appears malformed, for example invalid syntax, wrong message framing or misleading routing. The server blames the client request, and repeating it unchanged gives the same error.
Check the URL for typos, clear cookies for that site, then retry in an Incognito window. If it works there, disable extensions one by one. If it fails everywhere, the site or request is at fault, so contact the owner.
Usually the request is at fault, but servers can be strict or misconfigured, for example rejecting valid long headers. If a request that worked before now fails with 400, compare what changed on both sides.
Read the response body, which usually names the invalid field. Validate the JSON, confirm the Content-Type header matches the body, and check required fields and types against the API documentation. Test with curl -v to see exactly what is sent.
Google treats 4xx responses other than 429 as content that does not exist and drops indexed URLs that return them. A 400 on a normal page URL is rare, so look for malformed links, bad redirects or a server rule rejecting valid requests from crawlers.
Aepto monitors expiry, DNS, SSL and uptime for every domain you own and alerts you when something changes. Free for 3 domains.