SiteError.comYour friendly guide to HTTP status codes
Status CodesBlog
  1. Home
  2. 4xx Client Error
  3. 431 Request Header Fields Too Large

431 Request Header Fields Too Large

📋
431
Request Header Fields Too Large
!
?

Example HTTP Response

HTTP Response
HTTP/1.1 431 Request Header Fields Too Large
Common Causes
  • Cookie header too large
  • Too many custom headers
  • Excessively long header values
Technical Details

What does this mean?

TMI in the headers! You're sending so much metadata that the server's eyes glazed over. Trim those headers down!

Technical Definition

The server is unwilling to process the request because its header fields are too large.

RFC Says

"The 431 (Request Header Fields Too Large) status code indicates that the server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields."

Plain English:

431 means 'Your HTTP headers are too big.' This can happen when you have too many cookies, very large authorization tokens, or numerous custom headers. The server has a limit on total header size (often 8KB) and you've exceeded it.

Common Misinterpretation

If only one specific header is too large, consider mentioning which one in the error message. This often happens with JWT tokens or cookies. Don't confuse this with 413 (payload too large) - 431 is about headers, 413 is about the request body.

View RFC Documentation
Code Snippets

Ready-to-use code for returning this HTTP status in your application:

Node.js
// Express.js
app.get('/example', (req, res) => {
  res.status(431).json({
    error: 'Request Header Fields Too Large',
    message: 'Your error message here'
  });
});

// Native HTTP
const http = require('http');

http.createServer((req, res) => {
  res.writeHead(431, { 'Content-Type': 'application/json' });
  res.end(JSON.stringify({
    error: 'Request Header Fields Too Large',
    message: 'Your error message here'
  }));
}).listen(3000);

431 Request Header Fields Too Large FAQ

What causes a 431 Request Header Fields Too Large error?

Cookie header too large. Too many custom headers. Excessively long header values.

429 Too Many Requests451 Unavailable For Legal Reasons

Popular Status Codes

  • 200 OK
  • 301 Moved Permanently
  • 302 Found
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable

Compare Codes

  • 401 vs 403
  • 301 vs 302
  • 404 vs 410
  • 500 vs 502
  • Compare any codes →

Categories

  • Informational
  • Success
  • Redirection
  • Client Error
  • Server Error
  • NGINX
  • Cloudflare
  • AWS ELB
  • Microsoft IIS

Tools

  • Cheat Sheet
  • Status Code Quiz
  • URL Checker
  • API Playground
  • Blog

© 2026 SiteError.com. All rights reserved.