Skip to content
MtrXTools

431 Request Header Fields Too Large

The request headers are too big

Seen in Node.js, browsers, APIs

The server refused the request because one header, or all headers together, are larger than it allows.

Common causes

  • Too many or oversized cookies for the domain, common on localhost where many apps share cookies.
  • A very large Authorization token or custom header.
  • Node.js's default header size limit (16 KB).

How to fix it

  1. Clear the cookies for the site (or for localhost) and reload.
  2. Store less in cookies; keep large session data server-side.
  3. For Node.js, raise the limit only if needed: node --max-http-header-size=32768 server.js

Got a different message? Paste it into the error explainer.

Related errors

All 51 HTTP & CDN errors