Error Codes Wiki

HTTP 413 Payload Too Large — What It Means & How to Fix It

Error4xx client error

Overview

The HTTP 413 Payload Too Large status code indicates the request body exceeds the maximum size the server is willing to accept.

Key Details

  • Previously known as "Request Entity Too Large" in older HTTP specifications.
  • The server may close the connection to prevent the client from continuing to send data.
  • The Retry-After header may indicate when the client can retry if the condition is temporary.
  • Common when uploading files that exceed the server size limit.

Common Causes

  • A file upload exceeds the server maximum file size limit.
  • A JSON or XML request body is larger than the server allows.
  • Server configuration limits (like nginx client_max_body_size) are too restrictive.
  • Base64-encoded data in the request body inflates the payload size.

Steps

  1. 1Reduce the size of your request body or uploaded file.
  2. 2Check the server documentation for maximum allowed payload size.
  3. 3Compress files before uploading if the server supports it.
  4. 4Use chunked uploads or multipart requests for large files.
  5. 5If you control the server, increase the maximum body size configuration.

Tags

httpclient-errorpayloaduploadsize-limit

Related Items

More in 4xx Client Error

Frequently Asked Questions

It means the request body (such as a file upload) is larger than the server is configured to accept.