client error RFC 9110

HTTP 413 Payload Too Large

Request body is larger than the server will accept.

What it means

The request body exceeds the server's configured maximum. Nginx defaults to 1MB (`client_max_body_size`), Cloudflare's free plan caps at 100MB, AWS API Gateway at 10MB. The name changed from 'Request Entity Too Large' in RFC 9110 but many servers still say the old name in their error pages.

When servers send it

  • Uploading a file larger than the server allows
  • JSON body larger than the parser limit
  • Base64-encoded image in a JSON field that exceeds the size cap

What the client does

Tells the user the file is too large. Cannot retry same request without shrinking the body.

Common causes

  • Nginx `client_max_body_size` default (1MB) too low
  • Cloudflare 100MB / 200MB plan-based upload limit
  • API Gateway 10MB Lambda request limit
  • Framework body-parser default (Express: 100KB)

How to fix it

  • 1.Increase server body-size limit (`client_max_body_size` in nginx, `bodyParser` in Express)
  • 2.For very large uploads: use chunked upload or upload directly to S3 with a presigned URL
  • 3.Compress the request body if it's text (gzip)
  • 4.Shrink images before upload on the client side

Similar codes

← All HTTP status codes · HTTP status cheat sheet · HTTP headers reference