Sample File Generator

Create dummy test files of any exact size in 24 formats — PDF, ZIP, DOCX, XLSX, PNG, JPG, MP4, WAV, JSON, CSV, BIN and more. Runs 100% in your browser.

No file generated yet. Pick a format and size above, then click Generate.

Why You Need a Dummy File Generator (and What Makes a Good One)

If you've ever needed a 100 MB PDF to test an upload limit, a 1 GB binary blob to benchmark S3 throughput, or a perfectly-sized 5 KB JSON to fit a CDN edge cache, you already know the pain: half the "fake file" sites on the web hand you a renamed text file that any decent virus scanner or strict file-type validator will reject. This tool generates files with real format-correct headers, so a PDF really starts with %PDF-1.4, a ZIP really starts with PK\x03\x04, and a WAV really starts with RIFF....WAVEfmt.

Common Use Cases

How Exact-Byte Sizing Works

For every supported format the tool uses a different in-spec padding mechanism so the final file is exactly the size you asked for — not the nearest power of two, not "approximately":

In-Memory vs Streaming (Why You Want Both)

Generating a 100 MB file by allocating a single Uint8Array(100_000_000) works fine. Generating a 3 GB file that way will crash the tab — V8's heap usually tops out around 2 — 4 GB, and ArrayBuffers larger than ~2 GB are rejected outright by some browsers. The Stream to disk checkbox uses the File System Access API (showSaveFilePicker) to write 1 MB chunks straight to disk, never holding the full file in memory. Supported in Chrome, Edge and Opera (~74% of global users); Safari and Firefox fall back to the in-memory path.

Limitations & Caveats

Be aware of the following constraints before relying on the output for anything beyond size / quota validation:

Privacy & Safety

Everything happens client-side — no upload, no analytics on the generated bytes, no server round trip. The files contain only random or zero data; there is no executable code, no macro, no script payload of any kind. They are bit-for-bit safe to use as fixtures in CI, share with QA teams, or commit to a test-data repo.

Frequently Asked Questions

Yes. Every format starts with real, spec-compliant magic bytes (PDF %PDF-1.4, ZIP PK\x03\x04, PNG 89 50 4E 47, RIFF WAV, ISO BMFF ftyp) and is padded to the requested exact byte count using a legal in-format mechanism — comments, free-space boxes, ZIP STORE entries, RIFF data chunks. PDF / DOCX / XLSX open in their native viewers; PNG / JPG / GIF decode as 1×1 images; WAV plays as silence. Verified by automated tests against every format and a range of sizes.
In-memory generation works reliably up to 200 MB on most browsers (capped by JavaScript heap and Blob constructor limits). With the Stream to disk checkbox enabled on a Chromium browser, BIN / TXT / WAV files stream straight to disk up to 5 GB without holding the data in RAM. Safari and Firefox do not yet implement the streaming API and will fall back to the 200 MB in-memory cap.
No. The files contain only random bytes or zeros — no executable code, no embedded macros, no script payloads. Strict MIME-sniffing validators (S3 pre-signed URLs, Cloudflare R2, VirusTotal signatures) accept them because the magic bytes match the declared extension. They are commonly used by QA teams to test upload size limits, quotas, network throughput and CDN behavior.
A few structured formats have a hard minimum size driven by their on-disk overhead: PDF 480 B · ZIP 170 B · DOCX 1.6 KB · XLSX 2.7 KB · PNG 120 B · JPG 300 B · GIF 60 B · WAV 44 B · MP3 42 B · MP4 32 B. If you request fewer bytes than this minimum the tool warns and rounds up. For every other request the output is byte-exact — the size in your file manager equals what you typed.
Yes — up to 20 files in a single batch when using in-memory mode (each file is downloaded as sample-1.ext, sample-2.ext, ...). Streaming mode is one file at a time because the File System Access API requires a fresh save-picker invocation per file.
No — they are valid 1×1-pixel images of a fixed color with the requested size achieved by padding metadata chunks (PNG tEXt, JPG FFFE COM markers, GIF Comment Extension). Use this tool to test upload limits or storage quotas, not to generate visually rich test images.
MP3 contains one minimal MPEG frame (~32 bytes of silence) preceded by an ID3v2 padding tag that reaches the exact requested size — most players will recognize it but skip immediately. MP4 contains only an ftyp + free box (no media tracks); players will detect a valid container but report zero playable duration. Both are intended for size-validation tests, not playback. WAV, by contrast, plays as actual digital silence at 8 kHz mono.
Nothing. All file generation, SHA-256 hashing and download happens entirely inside your browser tab using the Web Crypto API and JSZip (loaded from cdnjs only when you generate ZIP / DOCX / XLSX). You can disconnect your network and the tool keeps working.