Sample Image Generator
Create dummy images at any file size you specify, with randomised artwork and dimensions every time. Built for testing upload limits, filling layouts, and checking image pipelines.
Placeholder images are needed constantly and are surprisingly annoying to source: you want one that is exactly 500KB to test an upload cap, or a 16:9 block to fill a layout, and instead you go rummaging through a downloads folder. This draws one to order — randomised artwork, randomised dimensions, and the exact byte size you asked for.
How to generate a sample image
- Choose an output format. JPG for realistic photo-like sizes, PNG when you need a larger file from the same content, WebP to test modern format handling.
- Pick a target size from the presets or type an exact figure in kilobytes.
- Generate. Four images appear, each with different artwork and a different aspect ratio.
- Download the one you want, or copy it as a data URL if it is under 200KB.
The Sample Image Generator runs entirely in your browser — nothing you enter is uploaded, stored, or logged.
When to use this tool
Testing an upload size limit
To check that a form really rejects files over 2MB you need one just under and one just over. Generating both takes seconds and proves whether the validation works.
Filling a layout before real photography exists
Randomised gradient blocks at the right aspect ratio show how a grid or card design behaves without licensing stock images or shipping grey rectangles.
Exercising an image pipeline
Thumbnail generation, EXIF handling, and progress indicators all behave differently on a 20KB file and a 5MB one. Having both on demand makes those paths testable.
Things worth knowing
- The size is exact. Artwork is scaled near the target, then the file is padded with bytes after JPEG's end-of-image marker, which every decoder ignores.
- PNG produces much larger files from the same drawing, so a PNG target is reached with a smaller image than a JPG one.
- Each generation is fully random — press it again for four completely different images at the same size.
- Data URLs are offered only under 200KB; beyond that they become unwieldy to paste anywhere.
Frequently Asked Questions
Are the images real image files?
Are these real image files?
How is the file size exact?
Can I choose the dimensions?
Is anything uploaded?
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.
Image Resizer by Pixels & Percent
Resize any image to exact pixel dimensions or a percentage, with aspect ratio locking.
Sample File Generator
Generate dummy images, PDFs, Word files, CSV, JSON, and video at an exact file size for testing uploads.