Upload fails on Vercel with error 413? The 4.5 MB function limit
Ship ItChecked against the official source
Source checked 10 Oct 2026 · Published 23 Oct 2026 · Last reviewed 23 Oct 2026 · By Ctrl+Z Therapy (how we test)
The short answer
Vercel's docs say the maximum payload size for the request body or the response body of a Vercel Function is 4.5 MB. A function that receives more returns error 413: FUNCTION_PAYLOAD_TOO_LARGE. Vercel's knowledge base says the most common reason is uploading large files through the function, and that functions should be treated like a lightweight API layer, not a media server.
What to do
- Check whether your uploads pass through a Vercel Function.
- Upload large files directly from the browser to a media host or storage, so the file never passes through the function. Vercel's example is client-side uploads to Vercel Blob.
- Send your API only the file URL.
- Ask your AI tool: "Uploads over 4.5 MB fail with 413 on Vercel. Change the upload so the browser sends the file straight to storage and my API only receives the file URL."
Good to know
- The 4.5 MB limit applies to Vercel Functions only.
- If the response is too big, Vercel suggests returning less data per request or streaming it.
Source
- Vercel: Functions limitations
- Vercel: FUNCTION_PAYLOAD_TOO_LARGE
- Vercel KB: How to bypass the 4.5MB body size limit
Checked on 10 Oct 2026. Prices, limits and settings change, so check the source before you rely on them.