# 400 Bad Request: Request Header Or Cookie Too Large

**Code:** `400` · **Category:** HTTP · **Seen on:** HTTP, Nginx, Browser

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

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/http/400-request-header-or-cookie-too-large)
