SVG Placeholder Image Generator

Create placeholder images at any size with your own colors and label, then copy them as SVG, data URI or CSS, or download SVG or PNG.

#E4E4E7
#52525B
Font size: 200px
Placeholder preview, 1200 by 630 pixels

SVG code (338 bytes)

<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="630" viewBox="0 0 1200 630">
  <rect width="100%" height="100%" fill="#e4e4e7"/>
  <text x="50%" y="50%" dominant-baseline="central" text-anchor="middle" font-family="system-ui, -apple-system, Segoe UI, Roboto, sans-serif" font-size="200" fill="#52525b">1200×630</text>
</svg>

Data URI (573 characters)

data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221200%22%20height%3D%22630%22%20viewBox%3D%220%200%201200%20630%22%3E%0A%20%20%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22%23e4e4e7%22%2F%3E%0A%20%20%3Ctext%20x%3D%2250%25%22%20y%3D%2250%25%22%20dominant-baseline%3D%22central%22%20text-anchor%3D%22middle%22%20font-family%3D%22system-ui%2C%20-apple-system%2C%20Segoe%20UI%2C%20Roboto%2C%20sans-serif%22%20font-size%3D%22200%22%20fill%3D%22%2352525b%22%3E1200%C3%97630%3C%2Ftext%3E%0A%3C%2Fsvg%3E

Why Generate Your Own Placeholders

Placeholder services that return an image from a URL are convenient until they go offline, slow down your local build or get blocked by a content security policy. A placeholder you generate once and paste into your code has none of those problems: an SVG placeholder is a few hundred bytes of text, scales without blurring, needs no network request when inlined as a data URI, and always shows the exact size it stands in for.

How to Use It

  1. Click a size preset such as Open Graph 1200×630, or type a Width (px) and Height (px).
  2. Choose the Background and Text color.
  3. Optionally type a Label (for example "Hero image"). Leave Auto on to fit the text, or untick it and use the slider.
  4. Copy the result with Copy SVG code, Copy data URI or Copy CSS, or save it with Download SVG / Download PNG.

Example Output

A 400×300 placeholder labelled Hero <image> with the default colors produces this SVG — note the escaped label:

<svg xmlns="http://www.w3.org/2000/svg" width="400" height="300" viewBox="0 0 400 300">
  <rect width="100%" height="100%" fill="#e4e4e7"/>
  <text x="50%" y="50%" dominant-baseline="central" text-anchor="middle" font-family="system-ui, -apple-system, Segoe UI, Roboto, sans-serif" font-size="44" fill="#52525b">Hero &lt;image&gt;</text>
</svg>

Use it in HTML as <img src="data:image/svg+xml;charset=utf-8,..." width="400" height="300" alt="">.

Outputs Explained

  • SVG code — paste inline into HTML or JSX, or save as a .svg file.
  • Data URI — the SVG URL-encoded after data:image/svg+xml;charset=utf-8,. Works in src attributes, CSS and Markdown.
  • CSS — a complete background-image declaration.
  • PNG — a bitmap at the exact pixel size, for tools that do not accept SVG.

Limitations

  • The label uses the viewer's system font, so it can look slightly different between operating systems. The PNG uses your own system font.
  • Auto font size is an estimate based on character count; very wide characters or emoji may need the manual slider.
  • Only solid colors: no gradients, patterns or images.

Tips

  • Always set width and height on the <img> so the browser reserves space and the layout does not shift when the real image arrives.
  • Pick colors with enough contrast if the placeholder will appear in demos; check them with the Contrast Checker.
  • Need a bitmap at another scale later? SVG to PNG converts the downloaded SVG at 2× or 3×.

Frequently Asked Questions

What is a placeholder image for?

It fills the space of a real image while you build a layout, wireframe or prototype. Using the exact final dimensions lets you check spacing, aspect ratios and responsive behaviour before the real photos or illustrations exist.

Should I use the SVG, the data URI or the PNG?

Use the data URI to inline the placeholder in HTML or CSS with no extra file, the SVG file when you want a tiny reusable asset, and the PNG when a tool only accepts bitmaps, such as some CMSs, email templates or design apps.

How do I use the data URI in CSS?

Click Copy CSS to get a ready line such as background-image: url("data:image/svg+xml;charset=utf-8,...");. The SVG is URL-encoded, so it works inside double quotes without further escaping.

Can I put any text in the label?

Yes, up to 80 characters. Characters with special meaning in XML such as < and & are escaped, so the SVG stays valid. If you leave the label empty, the image shows its own size, for example 1200×630.

Is there a size limit?

Width and height can be 1 to 4000 pixels. The SVG stays under 1 KB at any size; the PNG grows with the dimensions.

Is anything uploaded?

No. The SVG is built as text in your browser and the PNG is drawn on a local canvas. Nothing is sent to a server.