Skip to content

4xx Client error

431 Request Header Fields Too Large

The request's headers are too big.

What 431 means

Usually caused by huge or too many cookies, or very long tokens in headers.

Common causes

  • Cookies piling up for a domain (common on localhost during development).
  • Very long Authorization or custom headers.

How to fix it

If you're calling an API

  • Clear cookies for the site, or send a shorter token.

If you run the server

  • Keep cookies small; raise header size limits only if necessary.

Should you retry?

After shrinking the headers.

Example response

HTTP
HTTP/1.1 431 Request Header Fields Too Large
Content-Type: application/problem+json

{
  "type": "about:blank",
  "title": "Request Header Fields Too Large",
  "status": 431,
  "detail": "The request's headers are too big."
}

Defined in: RFC 6585. 431 is a client error: change the request before retrying.

Debugging an API call? Convert your request with the cURL converter, check the response with the JSON formatter, or see whether the API is down on its status page.

HTTP 431 FAQ

What does HTTP 431 mean?

431 Request Header Fields Too Large: The request's headers are too big. Usually caused by huge or too many cookies, or very long tokens in headers.

Is 431 a client or server error?

It's a client error (4xx): something about the request needs to change before it can succeed.

How do I fix a 431 error?

Clear cookies for the site, or send a shorter token.

Should I retry after a 431?

After shrinking the headers.

Other 4xx status codes

All HTTP status codes