Skip to content
gohacks.dev
Testing

Dummy File Generator

Generate a test file of an exact size in KB, MB, KiB or MiB, filled with random bytes, zeros, text or CSV rows, and download it straight from your browser.

Free · No sign-up · Your inputs stay in your browser

Input

Generate a dummy file of any size

Output

9.54 MiB

Linux / macOS

head -c 10000000 /dev/urandom > dummy.bin truncate -s 10000000 sparse.bin # instant, takes no disk space fallocate -l 10000000 filled.bin # instant, really allocated (Linux)

Windows

fsutil file createnew dummy.bin 10000000

For testing upload limits (Nginx client_max_body_size, PHP upload_max_filesize and post_max_size), progress bars and storage quotas. Random bytes are the honest test for anything that compresses on the way, since a file of zeros shrinks to a few kilobytes under gzip. Capped at 512 MiB in the browser; on a server, the commands below have no limit.

Runs in this browser. Nothing you paste is sent to a server.

Testing upload limits

An upload passes through several limits: Nginx's client_max_body_size, PHP's upload_max_filesize and post_max_size, the framework's validation rule, a CDN or load balancer body limit and the storage quota. Files just under and just over each one show which layer rejects a request and what error the user sees.

Random versus zeros

Gzip and Brotli compress a file of zeros to almost nothing, so it does not exercise bandwidth or storage the way a real file does. Random bytes do not compress, which makes them the honest test for anything compressed in transit.

Share

Frequently asked questions

How do I create a large file quickly on Linux?
fallocate -l 1G file allocates it instantly, truncate -s 1G file creates a sparse file that takes no space, and head -c 1G /dev/urandom > file writes random data.
What is the difference between MB and MiB?
MB is 1,000,000 bytes and MiB is 1,048,576. Upload limits in PHP and Nginx use the binary meaning for M.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools