SVG Placeholder Generator

Share:

Generate SVG placeholder images for mockups, prototypes and CMS templates. Customise size, colour and text. Copy as raw SVG, data URI or download.

RT-IMF-001 · Image & File
Your browser is too old for this tool’s interactive features. Please update to Safari 13.1, Chrome or Edge 80, Firefox 74 or newer.

SVG Placeholder Generator Tool

×

                    
Advertisement
After results · AD-W1 Responsive · Post-tool — peak engagement

How to use the SVG placeholder generator

Pick dimensions

Type a width and height, or click one of the common-size pills (1200×630 for social, 512² for app icons, 1920×1080 for hero images).

Pick colours

Use the colour picker or paste a hex code. Background fills the rectangle; text colour is used for the dimension label.

(Optional) Customise the text

By default the placeholder shows its own dimensions. Override with any short label — a brand name, a section title, or a placeholder caption for later replacement.

Copy or download

Three output formats: raw SVG (paste into a Vue/React component), data URI (paste into CSS background-image), or full <img> tag. Or download a .svg file.

Advertisement
After how-to · AD-W2 Responsive

SVG placeholders — when, why, and how

Designers, front-end engineers and CMS template authors all have the same recurring need: a rectangle of known dimensions with a hint of what content goes there. Historically this was solved with raster placeholder services — via.placeholder.com, the Lorem Picsum hosts, or by exporting a quick PNG from Figma. Each of those approaches has costs: a runtime HTTP request, a tracking pixel, an external dependency that the page now depends on. SVG placeholders side-step all of that because they are tiny self-contained vector images you can embed inline.

Why SVG and not raster

This tool's default 1200×630 placeholder is 337 bytes as SVG. Drawn to a canvas and saved as PNG in Chromium, the same image came to 27,332 bytes (measured 28 Sep 2026) — an optimiser would shrink that, but not to a few hundred bytes. Smaller is faster — and SVG scales infinitely, so the placeholder looks correct on every screen density without serving multiple resolutions. SVG also embeds cleanly into HTML, CSS (via data URIs) and React/Vue/Svelte components without going through an image-pipeline step. For local development and CMS template work, the SVG placeholder is almost always the right choice.

The three output formats

The tool above produces three representations of the same image. The raw SVG form is the actual XML markup; paste it directly into a JSX/Vue component or into a template file. The data URI form encodes the SVG (as UTF-8, so any label text works) as a data:image/svg+xml;base64,... URL that fits inside any CSS background-image: url(...) rule or an <img src="..."> attribute. The img tag form gives you a complete HTML element with the data URI already wired in — copy and paste into a page mockup. All three forms are functionally equivalent; the format you want depends on where the placeholder is going.

A note on real production images

SVG placeholders are wonderful for prototypes and CMS templates. They are not a substitute for real production imagery. Marketing pages need actual photographs, branded illustrations, or AI-generated art with proper rights. The placeholder workflow is: ship the mockup with SVG placeholders, validate the layout with stakeholders, then swap each placeholder for the real image before launch.

Accessibility considerations

SVG placeholders are technically images and need alt attributes when used as <img> tags. The placeholder text inside the image is not read by screen readers — it's rendered text in vector form, not actual HTML text — so the alt attribute matters even when the image self-labels visually. For decorative placeholders (filler in a layout demo), alt="" is the correct value; for placeholders standing in for a real image whose content is meaningful, give them a real description that the eventual final image's alt would carry.

Cache and CSP gotchas

Two operational notes. First, an SVG embedded via a data URI is bytes-in-the-DOM — it does not hit the network, so it cannot be cached separately from the HTML. For repeated use across a site, save the SVG as a real .svg file and reference it by URL. Second, if your Content Security Policy has a strict img-src directive, data URIs are blocked by default — add data: explicitly to allow them.

A few hundred bytes against tens of kilobytes, and why SVG can run scripts

01

The default 1200×630 placeholder here is 337 bytes of SVG; the same image as a Chromium-saved PNG was 27,332 bytes.

02

Data URIs work in CSS background-image rules. You can build entire page layouts with placeholder backgrounds without a single HTTP request.

03

SVG is vector — it scales infinitely without blurring. The same few-hundred-byte file looks crisp on a phone, a 4K monitor, and a billboard.

04

A data URI is part of the file it sits in, so it is not cached on its own: repeat it in 50 components and it is in the bundle 50 times.

05

1200×630 is a common size for social-share images — but the Open Graph protocol itself sets no size; it only defines og:image:width and og:image:height tags to declare one.

06

SVG embeds JavaScript. Treat user-supplied SVG as untrusted input — opened directly or inlined, a malicious SVG can run scripts (loaded through <img>, it cannot). Placeholders you generate yourself are safe.

07

16:9 (1920×1080) is the HDTV aspect ratio, which is why so many video frames and hero images use it.

08

App icons on iOS and Android are square. iOS uses 1024×1024 source files; Android uses adaptive icons with separate foreground and background layers.

09

Internet Explorer 8 and earlier did not render SVG at all; every current browser does.

10

A generated placeholder needs no third-party service: the image is built in your browser, so a hosted placeholder service going offline cannot break your mockups.

Frequently asked questions

Yes — all current versions of Chrome, Firefox, Safari, Edge and the browsers built on them render SVG. Internet Explorer 8 and earlier did not.
This tool's default 1200×630 placeholder is 337 bytes as SVG; the same image saved as PNG from a Chromium canvas was 27,332 bytes — about 80 times larger. An optimised PNG is smaller, but still in kilobytes.
Yes, but the placeholder communicates "this image is missing." For a live production page, swap in the real image (photography, illustration, AI-generated art with proper licence). Placeholders are for development, prototyping and CMS templates.
Data URI encodes the SVG content as base64, which adds roughly 33% to the byte count. The raw SVG inside an XML/HTML tag is smaller. Use raw SVG inside HTML; use data URI inside CSS background-image.
Not reliably. SVG support in email clients is poor and inconsistent, largely because SVG can carry scripts, so use PNG placeholders for emails.
Used as an <img>, the placeholder is an image: screen readers announce its alt attribute, not the text drawn inside it. Always set a meaningful alt, or alt="" if it is purely decorative.
Yes. The tool generates plain SVG markup that you own — there are no watermarks, attribution requirements or licence restrictions. The placeholders are functionally equivalent to ones you'd generate yourself in Figma or Illustrator.
The tool allows sizes from 16×16 up to 4096×4096. At 16×16 the dimension label may not fit; below 64px in either direction, the text becomes hard to read. Above 4096px you should probably use a real image.
Yes — 8-digit hex codes (like #FF000080 for 50% red) are accepted. The browser colour picker only outputs 6-digit hex, but you can type an 8-digit value into the text field manually.
The text auto-scales based on the smaller dimension. For very wide-but-short placeholders, the text may look tiny relative to the rectangle. For best results use roughly-rectangular ratios (16:9, 4:3, 1:1).

Method & sources

How it computes

Builds an SVG rectangle 16–4096 px a side with a centred label at 10% of the shorter side (clamped 12–96 px), accepting colours only as #rgb, #rgba, #rrggbb or #rrggbbaa; output as raw SVG, a base64 data URI (UTF-8 encoded) or an <img> tag.

What this tool implements

  • Measured 28 Sep 2026: the default 1200×630 placeholder is 337 bytes of SVG and 27,332 bytes as a Chromium canvas PNG — the page had said 250–400 bytes against 8–15 KB.
  • The data-URI and <img> outputs used btoa(), which throws on any non-Latin-1 character, so a Chinese label or an em dash broke them; the SVG is now UTF-8 encoded first, and unvalidated colour text can no longer enter the markup.
  • The Open Graph protocol sets no image size — it defines og:image:width and og:image:height — so 1200×630 is a convention, not the spec's recommendation as the page said.

Sources

Advertisement
Pre-footer · AD-W3 728 × 90