What it means
The request's headers are too large, either one header or all headers together.
Common causes
- Too many or too large cookies
- Huge Authorization or JWT tokens
- Referer or custom headers with long values
How to fix it
As a client or visitor
Clear cookies for the site (common fix in browsers) and keep tokens small.
As the site or API owner
Avoid storing big data in cookies; raise header limits (Node.js --max-http-header-size, nginx large_client_header_buffers) only if needed.
Example response
HTTP/1.1
HTTP/1.1 431 Request Header Fields Too Large
Date: Tue, 07 Oct 2025 09:30:00 GMT
Server: nginx
Content-Length: 0 Specification
FAQ
› Why does localhost return 431?
Cookies from many dev apps on localhost add up. Clear localhost cookies.
› What is Node.js's header limit?
16 KB by default; change it with --max-http-header-size.