HTTP Status Codes / 4xx HTTP Status Codes / HTTP 413

413 Content Too Large (formerly Payload Too Large)

This is an educational reference page about HTTP 413 Content Too Large. The page itself is served as 200 OK so it can be indexed as HTTP documentation.

The request content is larger than the server is willing or able to process. RFC 7231 called this 413 Payload Too Large, and RFC 2616 called it 413 Request Entity Too Large.

Specification

Registered in the IANA HTTP Status Code Registry as Content Too Large. Defined in RFC 9110, Section 15.5.14.

What it means

HTTP 413 Content Too Large means the request body is bigger than the server will accept. RFC 9110 renamed the code; older docs and servers still say 413 Payload Too Large or 413 Request Entity Too Large, and all three names mean the same thing. The server may close the connection instead of reading the rest of the body.

When to use it

Common causes

Where you see it

Headers involved

Client fixes

Server fixes

Examples

Upload over the limit

POST /api/uploads HTTP/1.1
Host: api.example.com
Content-Type: image/png
Content-Length: 26214400

(25 MB of image data)

HTTP/1.1 413 Content Too Large
Connection: close
Content-Type: application/problem+json

{
  "type": "https://api.example.com/problems/upload-too-large",
  "title": "Upload exceeds 10 MB",
  "status": 413,
  "maxBytes": 10485760
}

Rejected before the body is sent

PUT /api/backups/latest HTTP/1.1
Host: api.example.com
Content-Length: 5368709120
Expect: 100-continue

HTTP/1.1 413 Content Too Large
Connection: close
Content-Type: application/json

{
  "error": "Backups larger than 2 GB must use multipart upload."
}

Common mistakes

Developer notes

A browser may show a 413 from a proxy as a connection reset instead of an error page, because the proxy closes the connection while the browser is still sending. If users report failed uploads with no error message, check the proxy logs for 413.

Questions

What does HTTP 413 mean?

HTTP 413 Content Too Large means the request body is larger than the server will accept.

Is 413 Payload Too Large the same as 413 Content Too Large?

Yes. RFC 9110 renamed 413 Payload Too Large to Content Too Large. Older names include Request Entity Too Large. The meaning did not change.

How do I fix 413 in nginx?

Raise client_max_body_size in the http, server, or location block that handles the upload, then reload nginx. The default is 1 MB.

See also

Header and content rules

What RFC 9110 says about a 413 response, quoted from the RFC. The 4xx class rules also apply.

The same rule is in the response obligations table and its JSON.

Related comparisons

4xx client error – the request contains bad syntax or cannot be fulfilled


HTTP status code lookup
REST API status code chooser
cURL command generator
By Ping Now, a website/API/service uptime monitor
Data from Wikipedia