Client Error · 4xx

431 Request Header Fields Too Large

The request headers, in total or individually, exceed the server's limit.

What 431 Request Header Fields Too Large means

431 Request Header Fields Too Large rejects requests with overly large headers. Common causes: cookie sprawl (sites accumulating dozens of large cookies), JWT tokens exceeding header buffer limits, or accidentally setting a very long User-Agent. Server limits vary: Nginx defaults to 8KB, Express 8KB, Cloudflare 32KB. This is rare but visible when it happens.

When servers should return it: Return 431 when total header size or any single header exceeds the configured maximum.

Common causes

How to fix 431 Request Header Fields Too Large

Example response

HTTP/2 431
content-type: text/plain
Header section too large

Related status codes

Frequently Asked Questions

Why are my cookies so big?
Each domain you visit can store ~4KB of cookies. Tracking, ad networks, and analytics SDKs accumulate cookies fast. Modern browsers cap total cookie size per domain.
Defined in: RFC 6585 · Class: 4xx Client Error

More references

For a one-page reference of all HTTP status codes, see the HTTP cheat sheet. For testing API responses, try the API Tester tool. For inspecting responses on the command line, the curl cheat sheet covers the most common flags.