Download 4 MB PDF file for testing
Open the single page and check document-upload behavior. The preset is 4 MiB (4,194,304 bytes); choose MB for decimal megabytes.
1 MB = 1,000,000 B · 1 MiB = 1,048,576 B
Advanced: test an upload limit
Enter the byte limit above, then choose one byte below, the exact limit or one byte above. Each choice uses the same base: 4,194,304 B. Generate and download each file to test your endpoint.
Where a 4 MB PDF comes up
- Reproducing "Maximum request length exceeded" on an IIS-hosted ASP.NET application.
- Checking a serverless upload endpoint that sits just under a 4.5 MB body cap.
- Testing attachment handling in help-desk or HR tools with a mid-sized document.
Limits it lands on
- ASP.NET: httpRuntime maxRequestLength defaults to 4096 KB. This file alone fills that, so the full multipart request goes over and is rejected.
- Vercel serverless functions accept request bodies up to 4.5 MB, so this PDF should still pass there — a useful contrast with the 5 MB file.
What is inside the file
Its padding stream is 4,193,584 bytes; the page tree, font object and cross-reference table account for the rest.
Opening it does not allocate 4 MB of rendering work — viewers skip the unreferenced stream entirely.
Questions
Why does IIS reject a 4 MB upload when the limit is 4 MB?
maxRequestLength covers the whole request. A 4,194,304-byte file plus multipart headers exceeds 4096 KB, so ASP.NET throws before your code runs.
Which setting do I raise?
In classic ASP.NET both httpRuntime maxRequestLength (in KB) and IIS requestFiltering maxAllowedContentLength (in bytes) can block uploads; the smaller one wins.
Reference and checks
Format reference: PDF 32000-1.
Preset target: 4 MiB (4,194,304 bytes). Verify the downloaded file's byte count.
Generate another size in this format · Technical notes for every format · Guide to testing file upload limits · Data processing and privacy
Related tools: Merge PDF · Compress PDF.
Noticed an issue with this test file? Report an issue →
