413 Content Too Large
The request body is larger than the server is willing to process. Formerly called Payload Too Large.
At a glance
- Status code
- 413 Content Too Large
- Class
- 4xx, client error, the request itself is the problem
- Defined in
- RFC 9110
- Cacheable by default
- by explicit headers only
- Response body
- Should state the limit.
In detail
A hard limit was hit, usually on an upload. The limit may belong to the application, or to a proxy that never forwarded the request.
State the actual limit in the body. A 413 that does not say what the maximum is makes the client guess by bisection.
Check the proxy first. Common defaults are 1MB in one popular reverse proxy and 100MB at several CDNs, and those cut in before any application code runs.
Examples
HTTP/1.1 413 Content Too Large
Content-Type: application/json
{"error":"max_upload_bytes","limit":10485760}Things that catch people out
- If the server closes the connection before reading the whole body, some clients report a network error rather than the 413.
- A Retry-After on 413 means the limit is temporary. Without it, retrying the same body is pointless.
Try it: HTTP Request Builder
Build a request with any method, headers and body, send it, and read the status line the server returns.
HTTP Request Builder
LOCAL · Browser-OnlyBuild and test HTTP requests with custom headers and body
Authentication
Headers
Generate Code
curl -X GET 'https://api.example.com/endpoint' \
-H 'Content-Type: application/json'Showing a sample URL. Enter your endpoint above to update the snippet.
Related HTTP status codes
All http status codes →414 URI Too Long
The request URL is longer than the server will accept. Almost always caused by putting data in a query string that belongs in a request body.
431 Request Header Fields Too Large
The request headers are collectively or individually too large. Oversized cookies are the usual cause.
400 Bad Request
The server refused the request because it was malformed. The client must change something before retrying, because repeating the same bytes will fail.
415 Unsupported Media Type
The server refuses the request because the body is in a format it cannot handle, as declared by Content-Type.
416 Range Not Satisfiable
The Range header asked for bytes that lie outside the resource, for example bytes 5000 to 6000 of a 2KB file.
417 Expectation Failed
The server cannot meet the requirement in the Expect header, which in practice always means Expect: 100-continue.
Tools for this
- HTTP Request Builder Free online HTTP request builder - build and test HTTP requests with custom headers and body
- HTTP Headers Checker Free online HTTP headers checker - view HTTP response headers for any URL