# 413 Content Too Large

> https://http-status.org/docs/413

**Family:** 4xx Client Error

## Rationale

Request entity is larger than limits defined by the server.

## In Plain Terms

The file or data you're trying to send is too big for me to handle. Please make it smaller.

## Description

The HTTP 413 Content Too Large status code indicates that the server is refusing to process a request because the request payload is larger than the server is willing or able to process.

## Server Perspective

### Usage
- Return 413 for oversized uploads, bodies, or request content limits
- Use Retry-After only when the refusal is temporary rather than purely size-based
- File uploads exceeding size limits
- Request body too large for processing
- JSON/XML payloads over server limits
- Form data exceeding allowed size

### Implementation
- Document size limits clearly and enforce them consistently
- Explain whether the client should compress, chunk, resize, or choose another upload path

### Common Headers
- Retry-After

### Body
- Include the relevant size limit or upload policy when that helps the client choose a smaller request.

### Pitfalls
- Do not use 413 for oversized headers or URIs; use 431 or 414 instead
- Do not suggest a time-based retry unless waiting could actually change the outcome
- Headers too large (use 431 Request Header Fields Too Large)
- URI too long (use 414 URI Too Long)
- Bad request format (use 400 Bad Request)

## Client Perspective

### Pitfalls
- Do not assume waiting alone fixes a hard payload-size limit

## Examples

### File upload too large

File exceeds the server's 10MB upload limit

**Request:**
```
POST https://api.example.test/api/upload

<50MB binary payload>
```

**Response:**
```
413 Content Too Large
Content-Type: application/json

{
  "error": "content_too_large"
}
```

## Related Codes

- [400 Bad Request](/docs/400.md)
- [431 Request Header Fields Too Large](/docs/431.md)
- [414 URI Too Long](/docs/414.md)

