HTTP 413 Content Too Large: What It Means and How to Fix It
DIRECT ANSWER
HTTP 413 Content Too Large means the request body is larger than the server or an intermediate component is willing or configured to process. It commonly appears during file uploads, large form submissions, or API requests. The correct fix is to reduce the request size or adjust the responsible application, web-server, proxy, CDN, or WAF limit when authorized.
Key takeaways
- HTTP 413 applies to the request being sent, not necessarily to the size of the response or the entire website.
- Large uploads, form submissions, and API payloads are common triggers.
- A reverse proxy, CDN, WAF, web server, or application may reject the request before it reaches the application.
- Compare the request size with configured limits at each layer rather than changing every limit at once.
- Confirm the fix with the same URL, method, content type, and payload pattern, then check that smaller and unrelated requests still work.
Site Administrator
Last reviewed: September 25, 2026
What this error means & how to recognize it
- A browser, API client, upload tool, or monitoring check receives HTTP 413 Content Too Large.
- The error appears when submitting a large file, form, JSON document, multipart request, or other request body.
- A smaller version of the same request may succeed while the larger request fails.
- The response may come from a proxy, CDN, WAF, web server, or application and may have different headers or body text depending on that layer.
- The rest of the site may remain available, and unrelated URLs or request types may continue to work.
- DNS resolution and TLS can still be healthy because 413 is an HTTP-layer response.
Root causes, ordered by likelihood
- The request exceeds an upload or body-size limit. The application or web server may enforce a maximum request-body, file, form, or multipart size.
- An intermediary has a lower limit. A reverse proxy, CDN, load balancer, or WAF can reject the request before the origin application receives it.
- The request is routed through a stricter endpoint. Different URLs, methods, virtual hosts, or environments may have different size policies.
- Configuration limits do not match. The proxy may allow a request that the application rejects, or the application may allow one that the proxy blocks.
- The request is unintentionally larger than expected. Multipart overhead, an oversized encoded field, an attached file, or a client retry with duplicated data can increase the body size.
- The endpoint intentionally rejects large content. Some APIs or upload routes impose a product or security limit that should not be removed without confirming the intended policy.
How to fix it
For visitors and API users
- Confirm the exact URL and repeat the request once without repeatedly refreshing it.
- If you are uploading a file, try a smaller file or reduce the file size using an approved format or compression method.
- For an API request, compare the failing payload with a minimal valid payload. Check for unexpectedly large fields, embedded data, duplicated content, or an incorrect multipart construction.
- Confirm that the request uses the intended method and content type. Do not remove authentication or security controls just to bypass the error.
- If smaller requests work but the required request does not, send the site owner the URL, method, approximate request size, timestamp, response headers, and a sanitized description of the payload. Do not share passwords, cookies, tokens, or API secrets.
For site owners and developers
- Capture the failing request. Record the URL, HTTP method, content type, approximate body size, status, response headers, and whether the request passes through a proxy, CDN, load balancer, or WAF. Redact credentials and personal data.
- Reproduce with a size comparison. Test a minimal valid request and progressively larger requests, or compare a successful upload with the failing one. This helps establish the effective limit without changing configuration prematurely.
- Identify the generating layer. Compare the response body, headers, access logs, proxy logs, WAF events, and application logs for the same timestamp and request. If the request is absent from application logs, an upstream component may have rejected it first.
- Compare limits along the path. Check the relevant request-body, upload, multipart, proxy, CDN, WAF, and application limits. The effective limit is controlled by the first component that refuses the request.
- Choose the narrowest correction. If the request should be accepted, adjust only the relevant route or component after confirming authorization, memory, storage, timeout, and security implications. If the limit is intentional, keep it and change the client workflow or document the supported maximum.
- Retest the original request pattern. Use the same method, URL, content type, and representative payload size. Confirm that an accepted request reaches the application and that malformed or clearly oversized requests remain handled as intended.
- Check adjacent behavior. Test a smaller request, an unrelated route, authentication behavior, and any other proxy or application tier affected by the configuration change. Keep the change version controlled and record the final limit and reason.
Prevention & how to verify the fix
- Document the supported maximum request, file, and multipart sizes for each upload or API route.
- Keep application, web-server, proxy, CDN, and WAF limits visible and version controlled where possible.
- Test boundary sizes and representative large requests in a non-production environment before release.
- Monitor 413 responses by route, method, client, and deployment so an unexpected increase is distinguishable from an intentional limit.
- Ensure clients validate file and payload size before transmission and provide a clear alternative when a request is too large.
- Retain enough sanitized proxy and application logging to determine which layer rejected a request without recording secrets or unnecessary personal data.
When to get outside help
Escalate to the site owner, hosting provider, or platform administrator when a required upload or API request is rejected unexpectedly, the response originates from infrastructure you cannot configure, or changing the limit could affect memory, storage, timeouts, WAF policy, or other tenants. Include the exact URL, method, approximate body size, timestamp, response headers, request path through any proxy or CDN, and sanitized logs. Do not share passwords, session cookies, authorization headers, API keys, or private file contents.
Frequently asked questions
Is HTTP 413 caused by a large response from the server?
Usually no. HTTP 413 concerns content in the client’s request, such as an upload, form submission, or API body. A large response is a different problem.
Why does a small request succeed while a larger one returns 413?
The larger request has likely crossed a request-body or upload threshold enforced by the application or an upstream proxy, CDN, WAF, or web server. Comparing the two requests helps locate the effective limit.
Can a reverse proxy return HTTP 413 before the application sees the request?
Yes. An intermediary can reject an oversized request before forwarding it, so the application log may contain no matching request. Check proxy, CDN, or WAF logs as well as origin logs.
Should I increase the upload limit to fix HTTP 413?
Only if the larger request is expected and the change is authorized. Review memory, storage, timeout, abuse, and security implications, and update the relevant layer rather than raising every limit broadly.
Can HTTP 413 affect only one URL or API method?
Yes. Limits can differ by route, virtual host, method, environment, or infrastructure path. Other pages and request types may continue working normally.
What should I send the site owner about a 413 error?
Provide the URL, method, approximate request size, content type, timestamp, response headers, and a sanitized description of what was submitted. Never include passwords, cookies, tokens, or API secrets.
Further documentation
- MDN Web Docs — HTTP 413 Content Too Large: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413
- RFC 9110 — HTTP Semantics: https://www.rfc-editor.org/rfc/rfc9110