HTTP 413 Content Too Large (previously called Payload Too Large) means the request body is larger than the server is configured to accept. The server may close the connection or return a Retry-After header suggesting when to try again.
413 Content Too LargePOST /upload/profile-photo HTTP/1.1
Host: www.example.com
User-Agent: curl/8.6.0
Content-Type: image/jpeg
Content-Length: 10485760
[... 10 MB image data ...]HTTP/1.1 413 Content Too Large
Content-Type: text/html; charset=utf-8
Content-Length: 202
<!doctype html>
<html lang="en">
<head>
<title>413 Content Too Large</title>
</head>
<body>
<h1>File Too Large</h1>
<p>The file you uploaded exceeds the maximum allowed size of 5 MB.</p>
</body>
</html>Compress the file, reduce image resolution, or split the upload into smaller chunks.
On the server, increase the body size limit.
# Nginx: client_max_body_size 50M;
# Apache: LimitRequestBody 52428800
# Node.js: app.use(express.json({ limit: '50mb' }))For large files, implement multipart upload or chunked transfer encoding.
The uploaded file is larger than the server's configured maximum upload size (e.g., Nginx client_max_body_size).
The JSON or XML payload exceeds the API's request body size limit.
| Specification | Section |
|---|---|
| HTTP Semantics | RFC 9110 §15.5.14 |
This reference was compiled from official RFCs, protocol specifications, and hands-on troubleshooting experience. AI tools were used primarily for formatting and organizing the content on the page.