Stax

…

Tools

10 MB PDF File — Sample Download, Exact Size

A valid 10 MB sample PDF of exactly 10,485,760 bytes, built in your browser: free, no sign-up, nothing uploaded. Shows which upload limits it meets.

Last updated:

A 10 MB PDF is 10,485,760 bytes, the first size here that is over every default PHP limit, including post_max_size, and still well inside Gmail's attachment limit. It is the standard test for what happens when an upload is too big for the whole request, not just for one file. Press the button to build one on your device.

Built on your device in a moment: nothing is uploaded, and no file is hosted. A different size, another file type or a PDF with several pages: test file generator.

The exact file

Size10 MB (1 KB counted as 1,024 bytes)
Exact length10,485,760 bytes
In decimal megabytes10.486 MB
As base64, as sent inside JSON13,981,016 bytes
Pages1 (the rest is unused data that readers skip)
Saved astest-file-10mb.pdf

Over PHP's whole-request limit

PHP's default post_max_size is 8M (8,388,608 bytes), and this file is bigger. According to the PHP manual, when the posted data is larger than post_max_size, the $_POST and $_FILES arrays arrive empty. A script that only checks whether a file arrived may then tell the visitor nothing useful, so this is the file to test your error handling with.

Will a 10 MB PDF pass these upload limits?

LimitWritten asThis file
Express body-parser (default)the largest request body its JSON and form parsers accept. Express body-parser documentation100kbOver: rejected unless the limit is raised
nginx (default)the largest request body nginx passes on; a bigger one gets a 413 error. nginx core module documentationclient_max_body_size 1mOver: rejected unless the limit is raised
PHP upload_max_filesize (default)the largest single uploaded file. PHP manual, core php.ini directives2MOver: rejected unless the limit is raised
PHP post_max_size (default)the largest whole POST request, all fields and files together. PHP manual, core php.ini directives8MOver: rejected unless the limit is raised
Gmail attachments (personal accounts)the largest total size of attachments on a message. Gmail Help, send attachments25 MBFits
Cloudflare upload limit (Free and Pro plans)the largest request body Cloudflare passes to your site. Cloudflare support docs, error 413100 MBFits

Each limit is the default or documented figure from the source named beside it. Your own server or plan may differ, and an upload is a request that carries headers as well as the file, which the "right at the limit" verdict allows for.

How many fit in an email

Gmail allows 25 MB of attachments on a personal account. Two files of this size (20,971,520 bytes together) fit under that, and a third does not, whichever way MB is counted. It is a quick way to test how a mail client reports an over-size message. Other mail services often set limits in the same range, so a file this size is also a sensible test of the message-too-large path in your own app.

How long does a 10 MB upload take?

ConnectionTime to send 10,485,760 bytes
5 Mbps17 s
20 Mbps4.2 s
100 Mbps0.8 s

Best case: bytes times eight, divided by the speed in megabits per second, ignoring protocol overhead and the connection's ups and downs.

Sending time

At 5 Mbps this file takes about 17 seconds to send, at 20 Mbps about 4.2 seconds and at 100 Mbps about 0.8 seconds. Seventeen seconds is long enough that some visitors will click again or refresh the page, which makes the slow case worth testing for double submissions. Compare the three figures with what your own visitors have: a page tried only on a fast office connection never shows the slow case.

Frequently asked questions

How do I download a 10 MB PDF file?
Press the download button on this page. Your browser builds a valid PDF of exactly 10,485,760 bytes in a moment and saves it as test-file-10mb.pdf. Nothing is uploaded and no file is hosted, so there is no link to copy: the file exists only on your device.
Why are my $_FILES and $_POST empty after a 10 MB upload?
Because the request is bigger than post_max_size, which is 8M by default, and PHP discards the data instead of passing part of it. Raise post_max_size and upload_max_filesize together, and check any web server limit as well.
Is 10 MB too big for email?
Not for Gmail's 25 MB limit on personal accounts, which this file is well under. Work and school accounts have limits set by an administrator, and some servers set lower ones, so a 10 MB attachment can still bounce there.
What size is this file as base64?
13,981,016 characters. Base64 turns every three bytes into four characters, so the file grows by a third when it is sent inside JSON. Compare that figure, not 10,485,760, with a JSON payload limit.

Related tools