🎲 Random file generator

Make a dummy file of an exact size for testing an upload limit, filling a disk, or checking how something behaves with a file it cannot read.

Size
Filename
Contents

Random bytes or zeros — the difference matters

A file of zeros compresses to almost nothing. If you are testing an upload limit and something in the chain compresses the file on the way — a proxy, a CDN, a backup system — a 100 MB file of zeros can arrive as a few kilobytes and your test proves nothing. Random bytes do not compress, so the size you asked for is the size that travels.

Zeros are the right choice when you only need to occupy space on a disk, and they are generated far faster because nothing has to be computed.

What people use this for

Finding out where an upload form actually breaks, which is often not where the documentation says. Checking that a backup job handles a file larger than its buffer. Filling a volume to see how an application behaves when the disk is full. Confirming that an antivirus or a scanner does not choke on a file type it cannot parse.

The last one is worth a note. Testing how your own software handles a file it cannot read is a good reason to generate one. Producing a broken file to pass off as real work is not something this site helps with, which is why there is a generator here and no "corrupt an existing file" tool.

The file extension is only a label

Naming the file .jpg or .pdf does not make it one — the contents are random either way. That is often exactly what you want, because it tests whether a system checks the file itself or trusts the name. Many check only the name.

Size limits

The file is built in your browser's memory before it is saved, so the practical ceiling is what your machine can spare — usually a couple of gigabytes before things slow down. Above that, your operating system is the better tool: fsutil file createnew test.bin 5000000000 on Windows, or mkfile 5g test.bin on macOS.

If you need a real file broken into pieces rather than a fake one, see split a file.

Other tools you might need next

See all Developer Tools tools, or browse every free tool on the site.