n8n webhook 413 Payload Too Large: find limit, fix safely
Diagnose which layer returned an n8n webhook 413 Payload Too Large, then apply the smallest safe limit fix or move large uploads elsewhere securely.
HTTP 413 Payload Too Large means a component rejected a request because its body exceeded a configured limit. With an n8n webhook, that component could be n8n, a reverse proxy, a managed platform, or another service. Use the response, route, and logs to find it. Then raise only the smallest relevant finite limit, or move large uploads elsewhere.
What you observe
A webhook that worked before may return 413 when the request gets larger. A small JSON request can succeed while a multipart form, binary upload, base64 value, or large JSON array fails. The status code alone doesn't identify the rejecting layer.
A request may pass through DNS, a CDN or WAF, a load balancer, a managed platform, a reverse proxy, and n8n. If an n8n HTTP Request node receives 413 from another service, that remote service rejected n8n's outgoing request. Changing an inbound webhook setting won't fix it.
Self-hosted n8n can also reject large data internally. The caller may not always receive a clean 413. In a report using n8n 2.41.5 behind Nginx, Nginx returned an HTML 413 before n8n logged the request. An n8n webhook limit instead produced HTTP 500 for the caller and a related server-log error. Treat 413 as a symptom, not proof of the source.
Before you start: locate the rejecting layer
First, identify which component rejected the request. Save the current configuration and capture the complete response. A proxy-branded HTML page, a Server header naming a proxy, or a platform-specific error page can help. Avoid repeated large-file retries during diagnosis. They can fill logs or trigger rate limits.
- Map the route used by the sender. Identify the hostname and DNS target. Then check for a CDN, WAF, load balancer, ingress controller, managed platform, Nginx, Apache HTTP Server, Traefik, or another proxy.
- Confirm which container, pod, or n8n instance should receive the webhook. A Docker or Kubernetes memory setting isn't the same as an HTTP body-size limit.
- Send a harmless small JSON request with the expected authentication. This confirms routing and credentials. It doesn't prove that multipart or binary requests are allowed.
- Compare access and application logs for the same request. If a proxy records 413 and n8n has no matching entry, a proxy or platform stopped the request first. If n8n logs a body-size error, inspect its current payload setting. If only an HTTP Request node reports 413, inspect the remote API's response headers and documentation.
| Evidence | Likely rejecting layer | Next check |
|---|---|---|
| Proxy-branded HTML 413 | Nginx, Apache, Traefik, CDN, or ingress | Proxy and platform logs |
| No n8n log entry | Component before n8n | Reverse proxy, load balancer, or host |
| n8n error in the server log | n8n runtime | Current n8n payload setting |
| 413 inside an HTTP Request node | Remote API | That API's request limit |
| Small JSON works, file upload fails | Format or body-size limit | Multipart, binary, and encoding size |
Managed services may impose limits you can't change. Check the current official documentation for the exact n8n Cloud plan, CDN, load balancer, Kubernetes ingress, Cloud Run, Azure, or other platform in the route. Record the old configuration. Confirm that you can reload or restart the affected service before editing it.
Fix the layer that rejected the request
Change one setting at a time, beginning with the smallest relevant component. After each change, reload or restart only the required service. Then repeat the controlled check described in the next section.
For self-hosted n8n, inspect the environment variables supported by your exact n8n version. Recent material identifies N8N_PAYLOAD_SIZE_MAX and reports a 16 MiB default in n8n 2.41.5. Another source describes N8N_MAX_PAYLOAD_SIZE and a different default. Because the names and defaults conflict, don't copy either value blindly. Confirm the supported variable, unit, scope, and restart requirement in the current official n8n documentation for the deployed version.
If Nginx is in front of n8n, inspect the active server and location block that proxies the webhook. The usual directive is client_max_body_size. In the reported Nginx setup, its default was 1 MB. Set a deliberate finite value in the correct virtual host, validate the configuration, and reload Nginx. If the reload fails or you changed another virtual host, the request will behave as before.
For Apache HTTP Server, check LimitRequestBody in the active virtual host or directory configuration. For Traefik, inspect the middleware and entry point attached to the webhook router. The syntax depends on whether Traefik uses Docker labels, a file provider, Kubernetes IngressRoute, or another provider. Verify it against the current official documentation for that deployment.
For another reverse proxy or ingress controller, check the body-size control on the active route. On a managed platform, check its maximum request body, timeout, proxy, and function or container limits. n8n Cloud doesn't provide the same server-level access as a self-hosted instance. Check the current n8n Cloud documentation or support channel for the applicable limit.
If the smallest relevant limit changes nothing, stop increasing limits. Return to the topology and logs. A different proxy, a platform ceiling, or a larger-than-measured request may be responsible.
Reduce the payload or move the file transfer
A file's disk size isn't necessarily its HTTP request size. JSON adds syntax and field names. Multipart forms add boundaries and part headers. Base64 turns binary data into text before JSON adds its structure. The receiving limit therefore applies to the complete encoded request, not only the original file.
Reduce the request before raising limits:
- Send only the fields the workflow needs.
- Batch large record sets instead of posting one unbounded array.
- Use compression only when the receiver supports the chosen encoding.
- Avoid base64 when the receiving API accepts binary or multipart data directly.
- Remove duplicated metadata and unused file content.
For a large file, upload it to object storage and send n8n a reference, such as a URL, object key, checksum, and metadata. A pre-signed upload URL lets the client upload without exposing permanent storage credentials. A separate upload service can handle authentication, virus scanning, file validation, and resumable or multipart uploads.
If the receiving API rejects the request, use its documented chunked or multipart upload. You can also send bounded batches that fit its published constraints. Raising n8n's limit doesn't change the recipient's limit.
Verify the fix without accepting unsafe uploads
Verify the change with controlled requests. Keep the new limit finite, test the real upload format, and check both logs and resource use. A successful small JSON request proves only that routing and authentication still work; it doesn't prove that larger or different requests are safe.
Don't set the body limit to unlimited just to make the error disappear. Larger requests can increase memory use, execution data, proxy buffering, timeout risk, storage growth, and denial-of-service exposure.
- Send the original small JSON request. Confirm that routing and authentication still work.
- Send a controlled test body just below the intended finite limit. Use test data rather than sensitive files. Set the correct Content-Type.
- Increase the body in small steps until you confirm the intended boundary. Stop if latency, memory use, timeouts, or error rates rise unexpectedly.
- Test the real format separately. JSON, multipart form data, and binary requests can use different parsing paths and produce different effective sizes.
- Check the response status, headers, body, proxy logs, n8n logs, execution data, and elapsed time. If the proxy still returns 413, inspect the active route and reload result. If n8n now receives the request but fails internally, stop raising the proxy limit. Troubleshoot n8n or workflow memory instead.
- Repeat the test after the next service restart or deployment. This confirms that the setting isn't only a temporary runtime change.
Before accepting larger uploads, keep these controls in place:
- Set a finite maximum body size.
- Require webhook authentication or a signed request.
- Allow expected content types and validate file signatures, not only extensions.
- Apply request timeouts, rate limits, and concurrency controls.
- Enforce storage quotas and clean up abandoned uploads.
- Scan or isolate untrusted files before downstream processing.
- Prevent filenames, paths, and metadata from controlling storage locations.
- Keep a rollback copy of the configuration and define when to revert.
If the upload is optional for the automation, the safer reversible choice is often to restore the smaller limit and move the files to object storage.
Conclusion
Start with the response, route, and logs to identify the rejecting layer. Make one finite, version-appropriate change there. Verify it with controlled requests. If large files become the webhook's main purpose, use object storage or a dedicated upload service instead.
Frequently Asked Questions
Does an HTTP 413 always come from n8n?
No. Nginx, Apache, Traefik, a CDN, load balancer, managed platform, n8n, or the remote API can return it. Response headers, branded error pages, proxy logs, and n8n logs help locate the refusal. If n8n has no log entry, the request probably stopped earlier.
Why does a small JSON webhook work while a file upload fails?
A small request proves only that routing and authentication work. Multipart boundaries, binary fields, base64 encoding, field names, and file content increase the effective request size. Test the actual upload format and check every proxy, platform, and n8n limit on that route.
Should I make the n8n webhook payload limit unlimited?
No. Use a finite limit that fits the workflow. Authenticate the endpoint, validate content, and apply timeouts and rate limits. For larger files, use object storage or a pre-signed upload URL.
Sources
- n8n 413 Request Entity Too Large: Which Limit You Hit (flowtemplates.app)
- How to Fix n8n webhook payload too large Error - flowgenius.in (flowgenius.in)
- Fixing n8n error 413: payload too large | FlowKit (getflowkit.fr)