SiteError.comYour friendly guide to HTTP status codes
Status CodesBlog
  1. Home
  2. 4xx Client Error
  3. 413 Payload Too Large

413 Payload Too Large

📦
413
Payload Too Large
!
?

Example HTTP Response

HTTP Response
HTTP/1.1 413 Payload Too Large
Content-Type: application/json

{"error": "Max size is 10MB"}
Common Causes
  • File upload exceeds limit
  • Request body too large
  • Too much data in single request
Technical Details

What does this mean?

That's way too much! Like trying to stuff a king-size mattress into a compact car. Time to pack lighter!

Technical Definition

The request entity is larger than limits defined by server.

RFC Says

"The 413 (Payload Too Large) status code indicates that the server is refusing to process a request because the request payload is larger than the server is willing or able to process. The server MAY close the connection to prevent the client from continuing the request."

Plain English:

413 means 'Your request body is too big.' This happens when uploading a file that's larger than the server's limit, or sending a JSON payload that exceeds the maximum size. The response can include a Retry-After header if the condition is temporary.

Common Misinterpretation

Make sure your error message tells users the actual size limit. Also consider that 413 can be returned by reverse proxies (like nginx) before your application code even runs, so configure those limits appropriately.

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(413).json({
    error: 'Payload Too Large',
    message: 'Your error message here'
  });
});

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

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

413 Payload Too Large FAQ

What causes a 413 Payload Too Large error?

File upload exceeds limit. Request body too large. Too much data in single request.

412 Precondition Failed414 URI Too Long

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.