Random File Generator
Generate random test files of any size up to 100 MB: random ASCII text, lorem ipsum, crypto-random binary, zero-filled (for sparse-file testing), or noise PNG (for upload tests with content-type checks). SHA-256 receipt included. 100% browser-side.
What is the Random File Generator?
Random File Generator produces test files of any size up to 100 MB across five content kinds: Random ASCII text (cryptographically-random uniformly-distributed letters + digits — incompressible), Lorem ipsum (Latin filler sentences — text/plain), Random bytes (crypto.getRandomValues output — best for upload testing of incompressible binary), Zero-filled (all 0x00 — useful for sparse-file testing and storage benchmarks since it compresses to near nothing), and Noise PNG (PNG-encoded random RGB noise for image-upload testing where the backend checks content-type). Every random byte comes from `crypto.getRandomValues` chunked in 64 KB blocks to respect the WebCrypto per-call API limit. A SHA-256 hash of the generated content is computed and shown as a receipt — useful when running upload integrity tests. Customisable filename and per-kind file extension. 100 MB hard cap to prevent browser-tab OOM.
How to use it
- Pick a kind: random ASCII text, lorem ipsum, random bytes, all-zeros, or noise PNG.
- Set the file size (any bytes up to 100 MB) and the filename base.
- For PNG: pick the image dimensions (default 512×512).
- Click Generate — wait, then Download. The SHA-256 receipt is shown for integrity verification.
Benefits
- Five content kinds covering text, binary, sparse, and image upload-test cases.
- Crypto-strong randomness via `crypto.getRandomValues` chunked in 64 KB blocks.
- Up to 100 MB per file — limited to keep browser memory sensible.
- Random ASCII text uses rejection sampling for uniform alphabet distribution (no modulo bias).
- Lorem ipsum draws from the standard 60-word Lorem Ipsum corpus.
- Zeros mode is much faster (no entropy work) and produces tiny gzip output.
- Noise PNG generated via canvas + toBlob — real PNG, valid headers.
- SHA-256 receipt of the generated content for upload-integrity testing.
- Six size presets (1 KB to 25 MB) plus arbitrary byte input.
- Runs 100% in your browser — Toollyz has no server.
Frequently asked questions
What's the maximum size?
100 MB per file. The cap exists because the browser allocates the full content in memory and very large allocations can crash the tab. For larger test files, use a CLI tool like `dd if=/dev/urandom of=test.bin bs=1M count=N`.
Are the random bytes truly random?
Yes — every byte comes from `crypto.getRandomValues`, the WebCrypto cryptographically-strong RNG. Seeded from the OS entropy pool, suitable for production use cases (not that you should use generated files for production).
Why offer zero-filled files?
Three uses: (1) testing sparse-file handling in your storage backend — zeros compress to nearly nothing; (2) benchmarking compression ratios; (3) creating fixed-size placeholder files quickly without entropy work.
What's the difference between 'Random ASCII' and 'Lorem ipsum'?
Random ASCII is crypto-strong uniformly-distributed letters and digits — looks like noise, incompressible. Lorem ipsum is real Latin filler text — compresses well, looks like prose. Use random ASCII for upload-test incompressibility, lorem ipsum for testing text-handling pipelines.
How is the noise PNG generated?
We allocate a canvas of the chosen dimensions, fill the pixel data with `crypto.getRandomValues` bytes (R, G, B per pixel; alpha forced to 255), then call `canvas.toBlob('image/png')` — the browser handles PNG encoding. The result is a real PNG with valid headers.
What's the SHA-256 hash for?
A receipt of the file's contents. Useful when running upload-integrity tests: compute the hash before upload, then compute it again from what the server stored, and compare. If they match, the upload was byte-identical.
Can I generate files in specific formats (PDF, DOCX, etc.)?
Not directly — those formats have complex structures. For upload testing where the backend checks the MIME type, the noise PNG is usually enough (it's a valid PNG by structure). For PDF / DOCX test fixtures, use a dedicated generator.
Why does the download have a fake-looking extension?
We default extensions to match the content kind (.txt / .bin / .zero / .png). Edit the filename to whatever you need — the content doesn't change.
Is the noise PNG actually compressible?
Barely. PNG uses DEFLATE which works on patterns; pure RGB noise has no patterns, so the encoded size is ~3 × width × height bytes (roughly the raw pixel size). For testing compression-aware backends.
Does the tool save my generated files?
No — they live only in your browser session via blob URLs that are revoked when the page closes. Download to keep them.
Is anything uploaded?
No. Generation and hashing run entirely in your browser.
Related tools
See all developer toolsSecure File Shredder
Overwrite a file's bytes with crypto-random data before download.
Duplicate File Name Cleaner
Find duplicate file names and propose unique renames.
Fake JSON Data Generator
Schema-driven fake JSON for mocking APIs (crypto-strong randomness).
Hash Generator
MD5 + SHA-1/256/384/512 of text or file, with HMAC support.