A placeholder image stands in for a real picture while a page is being designed. This image placeholder generator makes one to your exact size: choose the width and height, the background and text colours, the label and the file type, and download a PNG, JPG, WebP or SVG. You also get a data URI you can paste straight into an img tag or a style sheet, so the placeholder needs no file and no server.
How the image placeholder generator works
Enter a width and a height in pixels, from 1 to 4,000. Pick a background colour, optionally a text colour, and optionally your own label. If you leave the label empty the picture shows its size, such as 600 × 400, which is the usual convention for placeholders. Press Make image and the preview appears with its data URI underneath.
For PNG, JPG and WebP the tool draws the picture on a canvas in your browser and exports it. For SVG it writes a small piece of vector markup instead, which stays sharp at any size and is usually only a few hundred bytes.
Colours
Type colours as hex codes, with three digits (#ccc) or six (#cccccc), with or without the hash sign. Names such as red are not accepted, so the result is always predictable. If you leave the text colour empty the tool picks black or white for you. It works out the relative luminance of the background, a measure of how bright a colour looks, using the standard weights for the red, green and blue channels. [3] Backgrounds brighter than a luminance of about 0.179 get black text and darker ones get white. That threshold is our own working: it is the point where black and white text give the same contrast ratio, so the tool always chooses the more readable one.
Formats compared
| Format | Best for | Notes |
|---|---|---|
| PNG | Flat colours and text | Lossless and widely supported; the default. |
| JPG | Photo-style mockups | Lossy, with no transparency; the picture is filled with your background colour. |
| WebP | Small files on modern browsers | Not every browser can export it; the tool tells you when it falls back to PNG. |
| SVG | Any size, tiny file | Vector markup; the text is real text, so fonts may differ slightly between systems. |
Browsers must be able to export PNG, while JPEG and WebP are supported by many but not all. [1] If you ask for a format the browser cannot make, it quietly returns a PNG instead. The tool detects that and shows a note so you know what you actually got. [1]
Using the data URI
A data URI packs the whole file into the address itself. Its general form is data: followed by the media type, an optional base64 marker, a comma and the data. [2] Paste it into the src of an image tag, into a CSS background-image rule or into a stylesheet and the placeholder shows up with no extra request. This is handy in prototypes, e-mail templates, documentation and tests where you cannot or do not want to host files.
Keep an eye on size. Base64 text is about a third larger than the file it encodes, and a large PNG can produce a very long string, so for big placeholders prefer the SVG option or download the file instead. The size of the URI is shown under the preview.
Step by step
- Enter the width and height in pixels.
- Choose a background colour and, if you like, a text colour.
- Type a label, or leave it empty to show the size.
- Pick PNG, JPG, WebP or SVG.
- Press Make image, then Copy the data URI or Download the file.
Typical sizes
Designers often start from common ratios. A 1200 by 630 placeholder suits a social sharing card, 1920 by 1080 a full-screen hero banner, 300 by 250 a rectangle advert slot, 150 by 150 an avatar and 800 by 600 a standard photo in a gallery. Matching the size of the final asset lets you check the layout, the cropping and the way text wraps before real images arrive.
Why placeholders help
Layouts break in surprising ways when real images arrive: a portrait photo in a landscape slot, a very tall banner that pushes the text off screen, a missing image that collapses a card. Dropping in placeholders of the exact final size lets you test those cases early. It also lets designers, developers and writers work in parallel, because nobody has to wait for the photographer, and a reviewer can tell at a glance which slots still need artwork.
Tips
- Use a distinct colour per slot (for example grey for photos and blue for adverts) so a mockup is easy to read.
- Write what the image will be in the label, such as Hero photo or Team portrait, instead of the size.
- Use SVG for responsive layouts, since it scales without blur.
- Remember to replace placeholders before launch: a data URI left in production adds weight to every page.
- Keep the label short; long labels shrink to stay inside the picture.
Everything is drawn in your browser. No image is uploaded or stored, and you can use the result for any purpose.
What next
Use this often? Add Image Placeh to your Home screen.
Frequently asked questions
What is an image placeholder generator?
It creates a dummy picture of a chosen size, colour and label so you can finish a layout before the real images are ready.
What sizes can I make?
Width and height can each be any whole number from 1 to 4,000 pixels.
What is a data URI and how do I use it?
It is the whole image written into a web address. Paste it into an img src or a CSS background-image and the picture shows without a separate file.
Why did I get a PNG when I chose WebP?
Some browsers cannot export WebP and return a PNG instead. The tool detects this and shows a note.
How is the text colour chosen automatically?
The tool measures how bright the background is and uses black on light colours and white on dark ones.
Is my image uploaded?
No. It is drawn and saved in your browser.
Sources
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.