Stax

…

Tools

Sample PDF Files — Exact Sizes, 100 KB to 100 MB

Free sample PDF files of exact sizes from 100 KB to 100 MB, built in your browser with nothing uploaded. See which upload limits each size meets.

Last updated:

A sample PDF is a valid file of a known size that you use to test something: an upload form, an API, a mail attachment limit, a progress bar. This page links to sample PDFs of exact sizes from 100 KB to 100 MB. Pick a size, press its button, and the file is built on your own device, to the byte, so nothing is hosted, uploaded or tracked.

Choose a size

FileExact lengthUpload at 20 MbpsLimits it meets
100 KB PDF102,400 bytes0.0 sfits 5 and sits right at 1
500 KB PDF512,000 bytes0.2 sfits 5 and is over 1
1 MB PDF1,048,576 bytes0.4 sfits 4, sits right at 1 and is over 1
2 MB PDF2,097,152 bytes0.8 sfits 3, sits right at 1 and is over 2
5 MB PDF5,242,880 bytes2.1 sfits 3 and is over 3
10 MB PDF10,485,760 bytes4.2 sfits 2 and is over 4
20 MB PDF20,971,520 bytes8.4 sfits 2 and is over 4
50 MB PDF52,428,800 bytes21 sfits 1 and is over 5
100 MB PDF104,857,600 bytes42 sis borderline on 1 and is over 5

Why these sizes

Each size sits near a limit that real systems have. 100 KB is the default request limit of Express's body parser, 1 MB the default of nginx, 2 MB the default PHP file limit, 5 MB falls between PHP's file and request limits, 10 MB is over both, 20 MB is close to Gmail's attachment limit, and 100 MB is on Cloudflare's. The sizes page for each file shows exactly which of six limits it fits, hits or exceeds, worked out from the byte count.

Made in your browser, so exact

Download sites keep a folder of fixed files and can only offer the sizes they stored. Here the PDF is assembled when you press the button: a real one-page document plus one unused block of data that readers skip, sized so the whole file is exactly the number of bytes shown. The page confirms the byte count before it offers the download, and the method is tested against an independent PDF reader, which is why a 1 MB file really is 1,048,576 bytes.

What a sample PDF is not

The page says it is a test page and the rest is filler, so the file suits upload, transfer and size tests but not tests of PDF content such as text extraction or rendering. The filler is random, so it does not compress: use a real document to test a compressor. If you need a different size, a different file type or a PDF with several pages, the test file generator makes any of them.

Frequently asked questions

Are these files safe to download?
Nothing is downloaded from a server: your browser builds the file from scratch when you press the button, so there is no third-party file to be harmful. The PDF contains one page of text and a block of random bytes, with no scripts or links.
Can I use a link to download the file in a script?
No, because no file is hosted. For a script or a pipeline, generate the file once with the button, save it in your project, and use that copy. A pipeline can also make a file of any size with a command, but only a file made here is a valid PDF.
What does KB or MB mean on these pages?
The Windows way: 1 KB is 1,024 bytes and 1 MB is 1,048,576 bytes, so 1 MB here is 1,048,576 bytes. The page for each size shows the exact byte count. For sizes counted as 1,000, use the test file generator, which has a switch for it.
Why is my antivirus or PDF reader unhappy with the file?
It should not be: the file is an ordinary PDF with a block of unused data attached through the document catalog. A strict validator may flag that block, and a scanner that inspects content may dislike random bytes. If a tool objects, tell it the file is a size test.
How are these different from the files other sample sites host?
Those are fixed files that you download from a server. These are built on your device, so any size is possible, nothing travels over the internet, and the size is exact to the byte. The trade-off is that there is no stable link to the file.

Related tools