Skip to main content

Test File Generator — Create a Dummy File of Any Size

Generate a dummy file of any exact size in your browser — 1 KB to 2 GB, random bytes, text, CSV or JSON.

Worst-case for transfer compression — the truest test of a raw upload limit.
Your file will be exactly 10,000,000 bytes (10.00 MB decimal, 9.54 MiB binary).

Need a file in a format we do not generate here? We publish free sample files in 67 formats — images, video, audio, documents, archives and data.

Found a problem, or something that could be better? We read every message and we fix things quickly.

This free test file generator creates a dummy file of any exact size you name — 1 KB, 10 MB, 100 MB, 1 GB — and downloads it straight from your browser. Nothing is uploaded and nothing is stored: the bytes are built in memory on your own machine, so a 500 MB file costs you no bandwidth and reveals nothing about what you are testing.

Exactness is the point. Ask for 10 MB and you get 10,000,000 bytes, not “roughly ten megabytes”. That matters when you are probing an upload limit, because the interesting question is almost always whether the boundary is inclusive — generate one file just under and one just over and you will know in two minutes.

Pick the contents to match the test. Random bytes cannot be compressed, so they measure a raw transfer limit honestly. Zero-filled bytes compress to almost nothing, which is how you prove gzip or Brotli is actually switched on. Text, CSV and JSON come out as valid, parseable files, so you can push them through an importer rather than just a size check.

How to use

  1. Pick a common size from the chips, or type any number and choose the unit — decimal KB/MB or binary KiB/MiB.
  2. Choose the contents: random bytes for an honest transfer test, text or CSV or JSON when something downstream has to parse the file.
  3. Name the file if you want a specific name in your logs. The correct extension is added automatically.
  4. Click Generate & Download. The file is built in memory and saved by your browser — it never touches a server.

Frequently asked questions

How do I create a 10 MB file for testing?

Choose the 10 MB preset (or type 10 and select MB), pick your contents, and click Generate & Download. You get a file of exactly 10,000,000 bytes. If your system measures in binary units, select MiB instead and you will get exactly 10,485,760 bytes.

Is the file really the exact size I asked for?

Yes. Every content type is written byte-for-byte to the size you specify, including the structured ones — the JSON option pads with whitespace between tokens so the file stays valid at an arbitrary size, and the CSV and text options end on a newline. Check with ls -l, wc -c or your file manager and the number will match.

What is the largest file I can generate?

Two gigabytes, which is where most browsers stop being able to hold a single Blob. Files above roughly 250 MB are built in memory and can be slow or fail on a phone; desktop browsers handle them comfortably. For anything larger, or for real media formats, use our ready-made sample files instead — they are hosted and downloaded directly.

Does the file get uploaded anywhere?

No. The bytes are generated in your browser with JavaScript and saved by your browser. Nothing is sent to us or to anyone else, which is why this is safe to use inside a corporate network or when the file name itself would reveal something about your project.

Why is my 1 MB file showing as 0.95 MB?

Your operating system is using binary units. One decimal MB is 1,000,000 bytes; one binary MiB is 1,048,576 bytes, so a 1,000,000-byte file displays as 0.95 MiB. Windows labels binary units as “MB”, which is where the confusion comes from. Select MiB in the unit dropdown if you want the number your file manager shows to match what you typed.

Can I use these files commercially?

Yes. The files contain generated bytes and generic placeholder data — no third-party copyright, no macros, no tracking — so you can use them in commercial products, test suites and redistributed fixtures with no attribution required.

What people use test files for

Upload limits are the most common reason. Every form, API and storage bucket has a maximum request size, and the documented number is often not the enforced one — a 10 MB limit in the docs can be 10 MiB in the web server config and 8 MB at the proxy in front of it. Generating files on both sides of the stated limit finds the real boundary faster than reading configuration files.

Transfer timing is the second. To measure throughput honestly you need incompressible data, because a zero-filled file will sail through a compressed connection and tell you nothing about the link. The random-bytes option exists for exactly this.

Then there are parser and importer tests — a 200 MB CSV tells you whether your import streams or loads the whole file into memory — progress-bar and timeout testing, storage quota checks, and backup or sync verification where you simply need bulk that is not real customer data.

Decimal vs binary sizes, and why your file looks wrong

A kilobyte is 1,000 bytes. A kibibyte is 1,024. The standard has been unambiguous since 1998, and almost nobody follows it: macOS and Linux report decimal sizes, Windows reports binary sizes but labels them KB and MB, and storage vendors use decimal because it makes the number bigger.

The practical consequence is a 4.6% gap at MB scale that grows to 7.4% at GB scale. A file you generated as 100 MB (100,000,000 bytes) shows up in Windows Explorer as 95.4 MB. Neither number is wrong; they are counting different things. This tool offers both unit systems and always shows the exact byte count, which is the only figure that is never ambiguous.

Generated files versus ready-made sample files

Use this generator when the size is what matters and the format does not: an arbitrary byte count, a file to throw at an upload endpoint, a large CSV for an importer. It is instant, private and unlimited.

Use a ready-made sample file when the format matters — when you need a genuine JPEG with EXIF data, an H.264 MP4 that a video player will actually decode, a valid PDF, a real DOCX or a ZIP with a proper central directory. Those cannot be faked with arbitrary bytes, so we publish them as real files in 67 formats, each with a published SHA-256 and a direct link.

Generating test files from the command line

If you would rather not use a browser, the equivalents are short. On macOS or Linux, mkfile -n 10m test.bin creates a 10 MiB sparse file instantly, dd if=/dev/urandom of=test.bin bs=1m count=10 writes 10 MiB of real random bytes, and head -c 10000000 /dev/urandom > test.bin gives you an exact decimal 10 MB.

On Windows, fsutil file createnew test.bin 10000000 makes a 10,000,000-byte file from an elevated prompt. Note that sparse files created this way occupy almost no disk space and can behave differently from real data when uploaded, which is one reason to prefer a genuinely written file when you are testing a network path.

Related free tools

  • Image Resizer — Shrink images by percentage, exact pixel dimensions, or a target file size like 500 KB — all in your browser.
  • PDF Compress — Shrink a PDF's file size right in your browser — recompresses embedded photos, nothing is uploaded.
  • Favicon Generator — Turn any logo into a complete favicon package — favicon.ico, all PNG sizes, Apple touch icon, and webmanifest — in one click.
Free Tools by Pine & Birch — technology consulting, Toronto. Free to use, no signup, no attribution required.