Sample & Test File Generator

Create dummy test files of any exact size in 26 formats — PDF with real text pages, PPTX, ZIP, DOCX, XLSX, PNG, JPG, TIFF, MP4, WAV, JSON, CSV, BIN and more. Click a preset below to download one instantly. Runs 100% in your browser.

×

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

Popular presets — one-click test files

Click a preset to download it straight away. The generator above fills in too, so you can change any setting and generate again.

Small fixtures & API mocks

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. A test file is only useful if the thing you are testing accepts it as genuine. 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":

What's Inside a Generated Dummy PDF

PDF is the format people most often need for upload testing, and it is also the easiest one to get wrong. A file that merely starts with %PDF-1.4 will open in a lenient browser viewer and then be rejected outright by Acrobat or by a strict parser such as pypdf. Every dummy PDF this tool produces is a complete document object graph, not a header glued onto random bytes:

Set the Pages field to produce a genuine multi-page dummy PDF — each page is a separate Page object with its own content stream, so page-count assertions, pagination logic and print previews behave the way they would against a real document. A large size on a few pages is mostly padding; add pages if you need the bytes to come from content. The same applies to DOCX, where extra pages are real w:br page breaks rather than repeated text.

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 desktop Chrome, Edge and Opera; Safari, Firefox and mobile browsers 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 filler text, random or zero data; there is no executable code, no macro, no script payload of any kind. Every test file is bit-for-bit safe to use as a fixture 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 and TXT files stream straight to disk up to 20 GB (WAV up to 4 GB, the most its 32-bit size fields can describe) 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 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 600 B · ZIP 170 B · DOCX 1.6 KB · XLSX 2.7 KB · PNG 120 B · JPG 300 B · GIF 60 B · TIFF 183 B · WAV 44 B · MP3 42 B · MP4 32 B, plus JSON 69 B · XML 114 B · SVG 170 B for structured text, and a one-slide PPTX is never smaller than its template (about 98 KB). If you request fewer bytes than this minimum the tool warns and rounds up (except for 0, which gives an empty file). 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.
By default PNG, JPG and GIF are valid 1×1-pixel images padded to your requested byte size (PNG private chunk, JPG FFFE COM markers, GIF Comment Extension) — ideal for upload-limit and quota testing. For PNG, JPG and TIFF you can set a width × height to render a real, viewable image at those exact pixel dimensions (a gradient), still padded up to your target byte size. TIFF without dimensions is a full-size gradient picture whose pixels fill the byte target. GIF stays 1×1.
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.
Pick a format, type the number of bytes (or switch the unit to KB / MB / GB) and press Generate. The download is byte-exact, not rounded to the nearest block — if you ask for 26,214,400 bytes you get precisely that, which is what makes it usable for boundary tests like "reject at 25 MB, accept at 24.99 MB". Command-line alternatives such as dd if=/dev/urandom or fsutil file createnew hit the size exactly too, but they produce headerless random bytes that any format-sniffing validator rejects. If your test only checks the byte count either works; if it parses the file, you need real headers.
Choose PDF, set your target size, and optionally set Pages for a multi-page document — or click the Dummy PDF preset. Each page carries a title, lines of lorem ipsum text and a page-number footer (pick Zero-fill for blank pages). The file is a complete PDF object graph — catalog, page tree, a declared Helvetica font resource, accurate /Length on each content stream and a byte-correct xref table — so it opens in Acrobat and parses cleanly under strict libraries like pypdf, not just in browser viewers. Minimum size is 600 B; below that there is no room for a valid document and the tool rounds up. Extra bytes go into comment lines before the cross-reference table, so the byte count is exact and the file still ends with %%EOF.
Choose TXT or BIN, select the 0s & 1s content style and set the size — or click the Random 0s and 1s preset for 1 MB. TXT gives 64 random digits per line; BIN gives one unbroken run. Each digit is one byte (the characters 0 and 1, hex 30 / 31), so a 1 MB TXT holds about 16,000 lines. If you need random bits rather than the characters, use BIN with Random bytes: every byte is 8 crypto-random bits.
Yes. Choose TIFF / TIF. Leave Dimensions blank and the image grows to fill your byte target — a 10 MB TIFF is about 2,160 × 1,620 pixels of real image data. Set a width × height for exact dimensions; the size then acts as a minimum. Files are baseline TIFF 6.0 (uncompressed 8-bit RGB), the subset every TIFF reader has to support, and our tests open each one with Pillow.
Yes. Set the size to 0 in any format, or click a preset such as Empty PDF or Empty Excel file. You get a genuinely empty file with the extension you chose, which is the standard way to test “file is empty” errors in upload forms and importers. For files that are broken in other ways — cut off halfway, password-protected, a PNG renamed to .pdf, a ZIP with a bad checksum — use the Corrupt File Generator.
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 / PPTX). Every other format keeps working even with your network disconnected.