Test File Generator
Need a 5 MB JPG or a 100 KB PDF to test an upload limit? Pick a size and extension and download it instantly, generated locally in your browser, nothing is uploaded anywhere.
What you get
Real, valid files, not just correctly-named junk.
Structurally valid. Open in any PDF viewer, unzip cleanly, or render as a real GIF, padded to your exact target size.
A real tiny image, padded to size using standard comment/chunk mechanisms every image viewer already knows to skip.
Readable filler text, random bytes, or all-zero: your choice, exact byte count.
Everything above ~a few hundred bytes hits your exact target size. A handful of formats (PDF, GIF, JPG, PNG, ZIP) have a small unavoidable structural minimum. The tool always shows you the real generated size, not just what you asked for.
How it works
Each format is constructed byte by byte to its own spec, with the padding hidden in places parsers are required to skip. The PDF is a real five-object document whose cross-reference table lists the exact byte offset of every object, padded through an oversized comment line; the ZIP is a genuine archive with a local header, central directory, and end record around one zero-filled entry, including a real CRC-32 checksum computed over the payload, which matters because unzip tools verify that checksum and reject fakes. Images get the same treatment: the GIF grows through Comment Extension sub-blocks of up to 255 bytes each, the JPEG through COM segments capped at 64 KB apiece, and the PNG through a custom ancillary chunk spliced in before IEND, complete with its own CRC-32, with a lowercase first letter in its type so decoders know it's safe to ignore.
That structural honesty is the point: these files pass magic-number checks, decode in real viewers, and survive checksum validation, so they exercise upload pipelines that actually inspect content. One caveat when testing image uploads specifically: if the pipeline re-encodes images (most avatar and photo uploaders do), the padding is discarded during re-encoding and your 5 MB JPG comes out tiny on the other side. Test size limits at the point before re-encoding, or use ZIP or PDF, which pipelines rarely rewrite.
No file is fetched from anywhere: the bytes are assembled in memory and handed to your browser as a blob, which is why generation is instant even at hundreds of megabytes. Open DevTools and watch the Network tab while you generate and download; nothing moves in either direction.
Common questions
Are the files real or just renamed junk?
Real. The PDF opens in any viewer, the ZIP unzips cleanly, the GIF renders, and the JPG and PNG are genuine tiny images padded to size with standard comment and chunk mechanisms that viewers know to skip. That matters when whatever you're testing actually inspects the file.
Will the file be exactly the size I ask for?
Yes, down to the byte, for anything above a few hundred bytes. Formats like PDF, GIF, JPG, PNG, and ZIP have a small unavoidable structural minimum, and the tool always shows you the real generated size, so there are no surprises.
How large a file can I generate?
Up to 2 GB. Files are built in your browser's memory, so at multi-gigabyte sizes the real limit is your device's RAM. The tool caps at 2 GB because anything larger risks crashing the tab.
What are the content options for TXT and BIN files?
Three choices: readable filler text, random bytes, or all zeroes, each at your exact byte count. Random bytes are useful when testing anything that compresses data, since zeroed files compress to almost nothing and can make transfer tests look faster than they are.