Placeholder Image Generator
Make a dummy image up to 2000x2000 with your own colors and label, then download it as PNG or JPG or copy it as a data URI. Drawn locally, no image service.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the Placeholder Image Generator?
The Placeholder Image Generator draws a solid-color image with centred text, by default its own size such as 400×300. Set Width and Height in pixels or pick a preset (Avatar 100x100, Rectangle 300x250, Leaderboard 728x90, Skyscraper 160x600, Mobile Banner 320x50 and others), choose a background and text color, a font size, and PNG or JPEG.
The image is drawn on an HTML canvas in your browser. Download Image saves it as placeholder_400x300.png (or .jpg), and Copy Data URL puts the whole image on your clipboard as a data:image URI you can paste straight into an img src or a CSS background.
Width and height are limited to 1 to 2000 pixels and font size to 8 to 100 pixels. Values outside those ranges are clamped, and a note under the preview tells you when the size was limited. Long custom text wraps at word boundaries to 80% of the width; a single very long word is not broken.
- Any size from 1x1 to 2000x2000 px, plus ten common presets
- Custom background color, text color, label and font size
- PNG or JPEG download with a descriptive file name
- Copy the image as a data URI for inline use
- Drawn on a canvas in your browser; no external image service
Updated
How to use the Placeholder Image Generator
- Type Width (px) and Height (px), or click a Quick Presets button such as Leaderboard or Avatar.
- Set Background Color and Text Color, or click Random Colors for a pastel background with a readable grey text.
- Optionally type Custom Text; leave it empty to show the dimensions. Adjust Font Size if needed.
- Choose PNG or JPEG under Output Format.
- Click Download Image to save the file, or Copy Data URL to paste the image inline.
Worked examples
A 300x250 ad slot for a layout test
Input
Rectangle preset, background #e5e7eb, text #374151, PNG
Output
placeholder_300x250.png showing "300×250"
The text color has a contrast ratio of 8.32:1 on that background, so the label stays legible even when the image is scaled down in a responsive layout.
An inline image for a unit test
Input
1 x 1 pixel, PNG, Copy Data URL
Output
data:image/png;base64,iVBORw0KGgo...
A one-pixel data URI is handy for testing image loading code without network access. The text is still drawn but is invisible at that size.
Background and insight
Placeholder image services such as placehold.co, and the older placehold.it and lorempixel, made dummy images a URL away. The catch is that every mockup, test fixture and Storybook story then depends on a third-party server. When one of those services shut down, thousands of demo pages broke overnight. A locally generated file or data URI has no such dependency and works offline.
Data URIs are defined in RFC 2397. The image bytes are Base64 encoded, which makes them about a third larger than the file, so they are great for one-off tests and small inline images and poor for large images on production pages, where they cannot be cached separately. A 400x300 flat PNG is only a few kilobytes because flat color compresses extremely well; a JPEG of the same image is often larger and shows ringing around the text.
Ad slot sizes in the presets come from the IAB standard ad units, such as the 300x250 medium rectangle and the 728x90 leaderboard. They are useful for checking that a layout holds when the real creative arrives at its exact size.
Common use cases
Mockups and wireframes
Fill image slots in a prototype with exactly sized boxes that show their own dimensions.
Front-end development
Test responsive image layouts, aspect ratios and object-fit before real assets exist.
Ad slot testing
Drop IAB-sized placeholders into a page to check spacing around banners and sidebars.
Offline test fixtures
Embed a data URI in a unit test or Storybook story so it never depends on an external image service.
Tips and limitations
- Prefer PNG for placeholders. Flat color and text compress better as PNG and stay sharp; JPEG adds blur around the label.
- Downloads use the .jpg extension for JPEG, which every tool recognises.
- Data URIs are about 33% larger than the file and cannot be cached on their own. Use them for tests and tiny images, not big production assets.
- Random Colors only picks a text grey that reaches 4.5:1 against the background, falling back to black or white when none of the greys do.
- The font is Arial with a sans-serif fallback, so the label looks slightly different on systems without Arial.
Sources and further reading
- RFC 2397: The "data" URL scheme, IETF. Defines data URIs
- RFC 4648: The Base16, Base32, and Base64 Data Encodings, IETF. Base64, which makes the encoded image about a third larger
- New Ad Portfolio: Advertising Creative Guidelines, IAB. The standard ad unit sizes used in the presets
Frequently asked questions
How do I use a placeholder image as a data URI in HTML?
Click Copy Data URL and paste the result into the src attribute: <img src="data:image/png;base64,..." width="400" height="300">. It also works in CSS as background-image: url("data:image/png;base64,..."). Keep data URIs for small images and tests, since they are not cached separately.
What is the largest placeholder image I can make?
Width and height are each limited to 2000 pixels, and anything above or below the 1 to 2000 range is clamped, with a note under the preview. Browsers have their own canvas size limits, and very large canvases use a lot of memory, so the cap keeps the page responsive.
Should I download placeholder images as PNG or JPEG?
PNG, in most cases. A flat background with text compresses to a few kilobytes as PNG and keeps the edges of the label crisp. JPEG is designed for photographs; on flat graphics it often produces a larger file with visible artefacts around the text.
Does the placeholder generator call an image service like placehold.co?
No. The image is drawn on an HTML canvas in your browser and never leaves your device, so it also works offline. That also means there is no URL to hotlink; download the file or copy the data URI instead.
Why is my long label not wrapping in the placeholder image?
Text wraps at spaces once a line reaches 80% of the image width. A single long word or URL has no spaces to break on, so it runs past the edges. Add spaces, shorten the text or lower the font size.
What sizes are the placeholder presets?
Square Small 200x200, Square Medium 400x400, Square Large 800x800, Banner and Leaderboard 728x90, Rectangle 300x250, Skyscraper 160x600, Mobile Banner 320x50, Card Image 350x200 and Avatar 100x100. Several match standard IAB ad units.
Is there an in-depth guide to the Placeholder Image Generator?
Yes. “Placeholder Text and Images: Lorem Ipsum, Dummy Images and Their Pitfalls” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.