--- title: "413 Content Too Large — what it means and how to fix it" description: "The request body is bigger than the server is willing to accept. What causes an HTTP 413, what to try as a visitor, and what to check if it is your own site." url: https://atoneplace.net/error/413/ site: "At One Place" --- # HTTP 413 — Content Too Large **HTTP 413: Content Too Large** The request body is bigger than the server is willing to accept. ## What 413 actually means You tried to upload something larger than a limit somewhere in the chain, and the server cut it off. The limit is usually not in the application at all but in a web server or proxy in front of it — Nginx defaults to a 1 MB body, which is the single most common reason a perfectly good upload endpoint rejects a photo. It was called "Payload Too Large" in RFC 7231 and "Request Entity Too Large" before that; the code and the meaning are the same. ## Common causes - A file upload exceeding the server's configured maximum body size - Nginx `client_max_body_size` left at its 1 MB default - PHP `upload_max_filesize` or `post_max_size` too low - A CDN or load balancer imposing its own body limit before the origin sees the request - A base64-encoded payload that grew by a third in transit ## If you're just trying to view the page 1. Upload a smaller file — compress an image, or split a large archive 2. Check the site's stated upload limit; many publish one and enforce it here 3. If a video or PDF is marginally over, re-export it at lower quality rather than retrying the same file ## If it's your site 1. Raise `client_max_body_size` in Nginx — it defaults to 1 MB and must be set at `http`, `server` or `location` level 2. For PHP, raise both `upload_max_filesize` and `post_max_size`, and remember `post_max_size` must be the larger of the two 3. Check every hop: CDN, load balancer, reverse proxy and application each have their own limit and the smallest one wins 4. Send `Retry-After` if the limit is temporary, and state the actual maximum in the error body 5. For genuinely large files, use direct-to-storage uploads with presigned URLs rather than proxying through the app ## Reference - **Status code:** 413 - **Reason phrase:** Content Too Large - **Category:** 4xx — Client Error - **Defined in:** RFC 9110 §15.5.14 ## Common questions ### What does HTTP 413 mean? The request body is bigger than the server is willing to accept. You tried to upload something larger than a limit somewhere in the chain, and the server cut it off. The limit is usually not in the application at all but in a web server or proxy in front of it — Nginx defaults to a 1 MB body, which is the single most common reason a perfectly good upload endpoint rejects a photo. ### How do I fix a 413 error? Upload a smaller file — compress an image, or split a large archive ### Is 413 a client error or a server error? 413 is in the 4xx range, which means client error. The request itself was the problem, so retrying it unchanged will usually return the same code. ## Related pages - [404 Not Found](https://atoneplace.net/error/404/) - [403 Forbidden](https://atoneplace.net/error/403/) - [401 Unauthorized](https://atoneplace.net/error/401/) - [429 Too Many Requests](https://atoneplace.net/error/429/) - [400 Bad Request](https://atoneplace.net/error/400/) - [422 Unprocessable Content](https://atoneplace.net/error/422/) - [405 Method Not Allowed](https://atoneplace.net/error/405/) - [409 Conflict](https://atoneplace.net/error/409/) - [415 Unsupported Media Type](https://atoneplace.net/error/415/) - [408 Request Timeout](https://atoneplace.net/error/408/) - [410 Gone](https://atoneplace.net/error/410/) - [451 Unavailable For Legal Reasons](https://atoneplace.net/error/451/) ## Sources - Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA (https://www.iana.org/assignments/http-status-codes/) - RFC 9110: HTTP Semantics — IETF (https://www.rfc-editor.org/rfc/rfc9110.html)