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.
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
- Click a size preset such as Open Graph 1200×630, or type a Width (px) and Height (px).
- Choose the Background and Text color.
- Optionally type a Label (for example "Hero image"). Leave Auto on to fit the text, or untick it and use the slider.
- 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 <image></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
.svgfile. - Data URI — the SVG URL-encoded after
data:image/svg+xml;charset=utf-8,. Works insrcattributes, CSS and Markdown. - CSS — a complete
background-imagedeclaration. - 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
widthandheighton 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.
Related tools
- Signature GeneratorCreate a handwritten-style signature by drawing or typing your name. Pick pen color and style, then download a transparent PNG or SVG.
- .gitignore GeneratorGenerate .gitignore files for any language or framework. Select from Node, Python, Java, Go, Rust, React, Next.js, and more. Copy or download.
- Chart MakerMake bar, line, pie and doughnut charts from pasted data or CSV. Customize colors, titles and labels, then download a high-resolution PNG.
- Favicon GeneratorGenerate favicons in multiple sizes (16×16, 32×32, 48×48, 64×64, 128×128) from any uploaded image. Download all sizes as individual PNGs.
- README GeneratorGenerate a professional GitHub README.md with sections for description, badges, installation, usage, and contributing. Copy or download as .md.
- License GeneratorGenerate open source license files: MIT, Apache 2.0, GPL 3.0, ISC, BSD 2-Clause, BSD 3-Clause, Unlicense. Copy or download as LICENSE.
All Generators tools · Found a bug or a wrong result? Report it.