Sitelet https://funapi.dev/status/431

HTTP 431 Request Header Fields Too Large

The request's headers are too large — all together, or one of them on its own — for the server to process.

Defined in RFC 6585 §5 — 431 Request Header Fields Too Large · MDN reference

Where you meet HTTP 431 in production

Bloated cookies accumulated across subdomains, oversized JWTs carrying too many claims or roles, and tracing headers that grow with every hop.

Why you would test it

Grow the cookie jar or an Authorization token until something breaks. The limit is usually hit at a proxy, so test through the same chain production uses.

What your client should do about a 431

Shrink the headers: clear cookies for the domain, slim the token (put claims behind an ID rather than inline), or remove redundant headers. Retrying unchanged will fail identically.

431 versus the codes it gets confused with

Endpoints that return 431

1 endpoint in this playground answers with 431. Every one is free, needs no signup, and can be called from the browser or with curl.

Questions about HTTP 431

Why does clearing cookies fix a 431?
Cookies travel in the Cookie header. Too many, or too large, push the request headers past the server's limit.
How large can headers be?
Limits vary by server: 8 KB in total is common, 16 KB to 64 KB in some, and individual header limits can be lower.

Other client error codes

All HTTP status codes · All 39 mock REST APIs · Getting started guide

Last updated