Sample File Generator
Create placeholder files at any size you specify — sample images, PDFs, DOCX, CSV, JSON, text, and short videos — with randomised content each time. Built for testing upload limits, forms, and file handling.
Testing an upload form means finding a file of the right size, and hunting through your downloads folder for something near 2MB wastes a morning. This generates one to order: pick a type and a size and you get four freshly randomised files that are genuinely valid — the images open in an image viewer, the PDFs in a reader, the Word files in Word.
How to generate a sample file
- Pick a file type — image, PDF, Word, CSV, JSON, plain text, or a short video.
- Choose a target size from the presets, or type an exact figure in kilobytes.
- Generate. Four different samples appear, each with randomised content so no two look alike.
- Download the one you want, or copy a small image as a data URL to paste straight into HTML or CSS.
The Sample File Generator runs entirely in your browser — nothing you enter is uploaded, stored, or logged.
When to use this tool
Testing an upload limit
A form that claims to reject files over 2MB needs a file just under and just over that line. Generating both takes seconds and tells you whether the validation actually works.
Filling a design or demo with placeholder media
Randomised gradient images at the right dimensions stand in for real photography while a layout is still being built, without licensing anything.
Exercising a file pipeline
Storage quotas, virus scanners, thumbnail generators, and progress bars all behave differently on a 10KB file and a 10MB one. Having both on demand makes those paths easy to check.
Things worth knowing
- The size is exact. Content is scaled close to the target, then the file is padded using bytes each format ignores — after JPEG's end marker, after a PDF's %%EOF, after a ZIP's central directory.
- Video is the exception: MediaRecorder chooses its own bitrate and the container cannot be padded, so length is what you control rather than size.
- Recording video happens in real time — a five-second clip takes five seconds.
- Every generation is random, so hitting Generate again gives you completely different files at the same size.
Frequently Asked Questions
Are the files a real, valid format?
Are these real files or just padded junk?
Why is the video size not exact?
Can I get a shareable link to the generated image?
Is anything uploaded?
What is the largest file I can generate?
Related Tools
Image Compressor (Compress to Target KB)
Compress image to exact target KB (e.g. under 50KB, 100KB, 200KB) with live quality adaptation and alerts.
PDF Page Counter & Compressor Info
Inspect PDF metadata, count pages, analyze embedded objects, and reduce document overhead.
JSON Formatter & Validator
Format, validate, prettify, minify, and inspect JSON payloads with real-time error detection.