HTTP 413 Content Too Large
HTTP 413 Content Too Large (formerly Payload Too Large or Request Entity Too Large) means the request body is bigger than the server is willing to accept.
Quick answer
HTTP 413 Content Too Large (formerly Payload Too Large or Request Entity Too Large) means the request body is bigger than the server is willing to accept. It most often appears on file uploads that exceed a limit set in Nginx, a framework, a CDN or a serverless platform.
Last updated · Maintained by FreeAIToolz · How we test
What does HTTP 413 Content Too Large mean?
Limits exist at several layers, and the smallest one wins. Nginx defaults client_max_body_size to 1 MB, PHP uses upload_max_filesize and post_max_size, and serverless platforms such as Vercel and AWS Lambda cap request bodies at a few megabytes.
| Status code | 413 |
|---|---|
| Name | Content Too Large (formerly Payload Too Large / Request Entity Too Large) |
| Class | 4xx Client Error |
| Defined in | RFC 9110 §15.5.14 |
| Cacheable by default | No, unless Cache-Control says so |
| Safe to retry automatically? | No: change the request first |
| Related headers | Retry-After (if temporary) |
What causes HTTP 413?
- Upload larger than the web server limit (Nginx default 1 MB).
- Framework or language limits (PHP post_max_size, Express body-parser limit).
- Serverless or CDN request size caps.
How do I fix HTTP 413?
- Raise the limit at every layer: Nginx client_max_body_size 50M; PHP upload_max_filesize and post_max_size; express.json({ limit: "10mb" }).
- For very large files, upload directly to object storage (S3, R2) with a pre-signed URL.
What should a client do after HTTP 413?
Reduce the body size (compress, resize or chunk it); do not retry unchanged.
Does HTTP 413 affect SEO?
No SEO impact.
Example 413 response
HTTP/1.1 413 Content Too Large
Date: Mon, 01 Dec 2026 12:00:00 GMT
Content-Type: application/json
{"error":{"status":413,"message":"Content Too Large"}} How to return 413 Content Too Large in code
Express (Node.js)
res.status(413).json({ error: 'Content Too Large' }); Next.js route handler
return Response.json({ error: 'Content Too Large' }, { status: 413 }); FastAPI (Python)
raise HTTPException(status_code=413, detail="Content Too Large") PHP
http_response_code(413); Nginx
location = /example {
return 413;
} Other 4xx status codes
The request contains an error or cannot be fulfilled as sent. Fix the request before retrying.
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 407 Proxy Authentication Required
- 408 Request Timeout
- 409 Conflict
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 414 URI Too Long
- 415 Unsupported Media Type
- 416 Range Not Satisfiable
- 417 Expectation Failed
- 418 I'm a teapot
- 421 Misdirected Request
- 422 Unprocessable Content
- 423 Locked
- 425 Too Early
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 451 Unavailable For Legal Reasons
- 499 Client Closed Request
Frequently asked questions
How do I fix 413 in Nginx?
Why do uploads fail with 413 on Vercel or Lambda?
Is 413 a client or server error?
Related
- 411 Length Required HTTP 411 Length Required means the server refuses the request because it has a body but no Content-Length head.
- 414 URI Too Long HTTP 414 URI Too Long means the requested URL is longer than the server will process.
- 431 Request Header Fields Too Large HTTP 431 Request Header Fields Too Large means the server rejects the request because its headers are too big,.
- 400 Bad Request HTTP 400 Bad Request means the server cannot process the request because of a client error, such as malformed .
- Open the HTTP Status Codes Reference → Free, no signup.