400 HTTP Origin: Network OSI layer 5 · Session Last updated 18 Nov 2026

400 Bad Request: Request Header Or Cookie Too Large

The server rejected the request because its headers, usually accumulated cookies, are bigger than it allows.

Exact message you may see 400 Bad Request Request Header Or Cookie Too LargeRequest Header Or Cookie Too LargeBad Request - Request Too LongHTTP Error 400. The size of the request headers is too long.
Seen on: HTTP Nginx Browser

Meaning

Browsers send every cookie for the domain with each request. When their total passes the server limit (often 8 KB) you get this 400 until you clear cookies. Fix by deleting site cookies, trimming what the app stores in cookies, and raising large_client_header_buffers / LimitRequestFieldSize if needed.

Common causes

  • Too many or oversized cookies for the domain
  • Tracking/session cookies piling up on subdomains
  • JWT or session data stored in a cookie
  • Server header buffer too small
  • Very long query string or Authorization header

⚡ Quick fix

  1. Clear cookies for the site and reload
  2. Store big data server-side, not in cookies
  3. Raise server header limits (nginx large_client_header_buffers, Apache LimitRequestFieldSize)

Detailed fix by platform

Nginx

  1. large_client_header_buffers 4 16k;

How to diagnose

  1. Cookies — Very large?
  2. Server limit — Too small?
  3. Data in cookie — Needed?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

100 — HTTP 100 Continue (HTTP)100103 — HTTP 103 Early Hints (HTTP)1031040 — Cloudflare Error 1040 / 1041: Invalid request header modification (Cloudflare)1040400 — HTTP 400 Bad Request (HTTP)400400 — 400 Bad Request: Invalid Hostname (HTTP)400400 — 400 Bad Request: invalid character in header (HTTP)400400 — 400 Bad Request: missing Host header (HTTP)400400 — 400 Bad Request: multipart boundary not found (HTTP)400400

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.