Placeholder Image Generator

Set a width, height, background, text colour and label, and this generator draws a placeholder in your browser. Download it as PNG, JPG or WebP, or copy a tiny SVG data URL to paste straight into an img tag or CSS, so your mockup never depends on a third-party image service.

Pick the format by where the placeholder goes
FormatBest forNotes
SVG data URLPrototypes and code samplesNo file, no request, sharp at any zoom
PNGDesign files, uploads to a CMSLossless, every browser supports it
JPGPlaces that reject PNGLossy, no transparency
WebPTesting real page weightLossy here, small files

Updated

Hosted placeholder services are handy until one goes down or gets blocked by a network filter, and then every grey box in your demo breaks. This tool makes the image locally instead: you get either a real file or a self-contained SVG string that lives inside your code.

Make a placeholder

Choose a size, colours and an optional label. Copy an SVG data URL or img tag, or download PNG, JPG or WebP made in your browser.

Common placeholder sizes

Presets available in the generator
UseWidthHeight
Open Graph card1200630
Hero, 16:919201080
Blog thumbnail800450
Square post10801080
Portrait story10801920
Avatar256256
Product photo, 4:510001250
Leaderboard banner72890

Placeholder in an img tag and in CSS

Inline SVG placeholder, no request

The same 640 by 360 grey box used twice: once as an image source, once as a CSS background.

<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='360' viewBox='0 0 640 360'%3E%3Crect width='100%25' height='100%25' fill='%23e5e7eb'/%3E%3Ctext x='50%25' y='50%25' fill='%234b5563' font-family='system-ui, sans-serif' font-size='72' text-anchor='middle' dominant-baseline='central'%3E640 × 360%3C/text%3E%3C/svg%3E" width="640" height="360" alt="Placeholder 640 by 360" style="max-width:100%;height:auto" />
<div style="margin-top:8px;height:40px;background:#e5e7eb url(&quot;data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='40' viewBox='0 0 200 40'%3E%3Crect width='100%25' height='100%25' fill='%23e5e7eb'/%3E%3Ctext x='50%25' y='50%25' fill='%234b5563' font-family='system-ui, sans-serif' font-size='8' text-anchor='middle' dominant-baseline='central'%3EBanner%3C/text%3E%3C/svg%3E&quot;) center/contain no-repeat"></div>

Placeholders that help instead of hiding problems

A good placeholder has the same aspect ratio as the final image. If the hero will be a 16:9 photo, prototype with 1920 by 1080, not a square, or the layout you approve will crop badly later.

Write the intended size on the box. Designers, writers and photographers can then see what to deliver without opening the code.

Data URLs versus files

A data URL puts the image bytes in the src itself. For a small SVG that is cheaper than a network request and makes the snippet portable: paste it anywhere and it renders.

For anything you will upload to a CMS, store in a design file, or keep around, download a real file instead. Long data URLs are hard to read in code review.

How it works

  1. Choose a common size from the list or type your own width and height, up to 4000 pixels on each side.
  2. Pick the background and text colours. Leave the label empty to print the dimensions, or type something like Hero photo.
  3. The preview is drawn as an SVG in your browser. Copy the data URL or the ready-made img tag for code.
  4. For a real file, choose PNG, JPG or WebP and download. The canvas in your browser encodes it, so nothing is uploaded.

Tips

Frequently asked questions

Do these images ever expire?

No. A downloaded file is yours, and an SVG data URL is just text inside your page, so there is no server behind it that could disappear.

Why does the JPG download have no transparency?

JPEG has no alpha channel. Every placeholder here has a solid background anyway, but pick PNG or WebP if you edit the file later and need a transparent area.

Can I use the SVG data URL in CSS?

Yes. Wrap it in url("...") inside background-image. The tool already swaps double quotes for single ones and encodes #, < and > so the string survives inside CSS and HTML attributes.

Which browsers can export WebP?

Canvas export to image/png is required of every browser, while JPEG and WebP are optional. If a browser cannot make WebP, it quietly returns a PNG, and the file name here will say so.

Related: Avatar placeholder generator, Open Graph image generator, HTML images guide, Image compressor, Website image sizes.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Free Tools

We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.

Product

Who It's For

Features

Resources

Company

View Sitemap