Dummy PDF File Generator
Every dummy PDF file is an A4 document with real, selectable text. You choose the size and the number of pages.
Sample PDF files, ready to download:
One click, exact size (1 KB = 1,024 bytes), default options, built in your browser.
A dummy PDF file is a valid PDF document made only for testing. Download one free at the exact size you need, from 4 KB to 100 MB, with no signup. Each file is an A4 PDF with selectable text and a page count you choose (10 by default), generated in your browser, so you can test upload forms, PDF viewers, email attachment limits and storage pipelines without using a real document.
How we check it: every generated file must be exactly the size you set and pass pdf-lib (strict parse, page count and A4 page size) plus the %PDF- header, %%EOF and startxref checks; the last run on 21 October 2026 passed 155 of 155 runs across 17 formats (how the files are made and checked).
Download a dummy PDF file by size
Each page below has a ready-made PDF test file, its exact byte count and the limits it is closest to.
What is inside a dummy PDF file
Knowing what the file contains tells you which tests it is good for. The generated PDF is built with the pdf-lib library and has this structure (how we build and check these files):
- A4 pages (595 x 842 points) with a title bar, sample section headings and paragraphs of placeholder text in Helvetica.
- Exactly the number of pages you choose in Options: 10 by default, from 1 to 200. The page count is your choice and does not depend on the file size.
- Selectable, extractable text and document metadata (title, author, subject). There are no embedded images.
- Extra size beyond the real content is added as a PDF comment after the final %%EOF marker, so the file reaches your exact byte count while the document structure stays intact. If the size is too small for the pages you chose, the tool says the minimum size needed.
What a dummy PDF file is used for
Upload limit testing
Generate a PDF just under, exactly at and just over your limit to confirm your app accepts the first two and rejects the third with a clear error.
Viewer and thumbnail checks
Feed a multi-page PDF to previewers, thumbnailers and page counters to check they cope with more than one page. The Number of pages option sets the exact page count, so you can test 1 page and 200 pages.
Text extraction and indexing
The pages contain real text, so search indexers, text extractors and virus scanners have something to process. It has no images, so use a scanned document when you need to test OCR.
Email and storage limits
Find the size at which attachments bounce or gateways, CDNs and storage buckets refuse or time out.
How to test a PDF upload limit
Limit bugs cluster at the boundary, so test three files: one byte under the limit, exactly at it, and one byte over. In this tool, set the unit to B and type the byte count, for example 10485759, 10485760 and 10485761 for a 10 MB limit. The first two should upload and the third should fail with a clear message rather than a timeout or a generic 500.
Check which definition of "MB" your stack uses. Some products mean 1,000,000 bytes and others 1,048,576 bytes (1 MB here is 1,048,576 bytes). A 10 MB limit can therefore sit at either 10,000,000 or 10,485,760 bytes, and the boundary files above cover both.
Remember that multipart form uploads add headers and boundaries to the request body, so a file exactly at a server limit can still be rejected. Test a little below the documented figure as well.
| Limit | Size | Notes |
|---|---|---|
| nginx client_max_body_size (default) | 1 MB 1,048,576 B | Requests with a larger body get HTTP 413. |
| PHP upload_max_filesize (default) | 2 MB 2,097,152 B | Also capped by post_max_size, so raise both. |
| AWS Lambda synchronous invocation payload | 6 MB 6,291,456 B | Applies to request and response. |
| Amazon API Gateway REST API payload | 10 MB 10,485,760 B | Hard quota for REST APIs. |
| Outlook default attachment limit (Exchange accounts) | 10 MB 10,485,760 B | Administrators can change it. |
| Outlook attachment limit (internet accounts) | 20 MB 20,971,520 B | Per Microsoft Outlook guidance. |
| Gmail message size limit | 25 MB 26,214,400 B | Attachments grow about a third when encoded, so a 20 MB file can already be too big. |
| Cloudflare proxy request body (Free and Pro plans) | 100 MB 104,857,600 B | Larger requests return HTTP 413. |
Sample PDF file sizes and the limits they hit
The size chips above are picked to land near real thresholds: 1 MB is the nginx default body limit, 5 MB sits just under the 6 MB AWS Lambda payload limit, 10 MB matches API Gateway and the default Exchange attachment limit, 20 MB and 25 MB are typical email ceilings, and 100 MB is the Cloudflare proxy request limit on Free and Pro plans. The table below lists the ones a dummy PDF can reach.
Why a test PDF is better than a real one
Real PDFs carry names, prices and signatures, which makes them unsafe to attach to bug reports or drop into a staging bucket. A generated PDF has the size and page count you chose and no personal data, so a failure you see is reproducible by anyone on the team.
PDF file details
- Extension
- PDF .pdf
- MIME type
- application/pdf
- Smallest size
- 4 KB
- Largest size
- 100 MB
- Contents
- Standard PDF 1.7 multi-page document with vector layout
Dummy PDF file FAQ
Is the dummy PDF a valid file that opens normally?
Yes. It is a standard PDF created with pdf-lib, and it loads back cleanly in a PDF parser. Padding to reach your exact size is a PDF comment placed after the end-of-file marker, so viewers ignore it.
What is the largest and smallest dummy PDF I can create?
From 4 KB up to 100 MB. The minimum also depends on the pages you choose: the default 10 pages need about 23 KB, and if the size is too small the tool says the minimum needed. The maximum keeps your browser responsive while it builds the file in memory.
Can I get a PDF of an exact size like 5 MB?
Yes. Choose the size and unit (Bytes, KB, MB or GB) and the file is generated at that exact byte count, so a 5 MB request is 5,242,880 bytes.
How many pages does a dummy PDF have?
10 A4 pages by default. Set the Number of pages option to anything from 1 to 200: you choose it, it is not worked out from the file size. The file is still exactly the size you asked for, because the extra bytes are a comment after the final %%EOF marker. If the size is too small for the pages, the tool tells you the minimum it needs.
Does the dummy PDF contain images or scanned text?
No. It contains vector layout and selectable text only. That suits parsers, viewers and size limits, but not OCR tests, which need a scanned image PDF.
Are my files uploaded to a server?
No. The PDF is built entirely in your browser and never leaves your device.
Related guides
- How to Test File Upload Limits (N-1, N, N+1)
- Nginx 413 Request Entity Too Large: How to Fix It
- PHP upload_max_filesize and post_max_size Explained
- KB vs KiB: Kilobytes, Kibibytes and MB vs MiB
- Create a Dummy File of Any Size (Windows, macOS, Linux)
- File Signature Magic Bytes: Validate Uploads Safely