SVG Placeholder Generator
Generate lightweight SVG placeholder images with custom dimensions, colors, text, and border radius.
SVG Placeholder Generator tool
Example
Input: Width 400, Height 300, default colors, Display Text empty and Font Size 0 (auto)
Result: A 400 x 300 SVG with a #E5DDD5 background and the centered text "400x300" at font-size 37.5, plus URL-encoded and Base64 data URIs
Auto font size is one eighth of the shorter side (300 / 8 = 37.5), with a 12 px minimum, so the label scales with the placeholder.
- Enter the desired width and height for the placeholder image in pixels.
- Enter a background color and text color as hex codes or any other CSS color value.
- Type custom display text or leave it blank to show the dimensions automatically.
- Preview the generated SVG placeholder in real time.
- Copy the SVG code or data URI, or download the placeholder as an SVG file.
Lightweight SVG Placeholder Images for Mockups
This tool makes a simple placeholder image as SVG code: a colored box of any size with a label such as 400x300 in the middle. Copy the markup or a data URI, or download the .svg file.
Placeholders fill the gaps while real images are still missing. You might use them in wireframes, prototypes, CMS templates or layout tests. An SVG placeholder beats a bitmap because it is tiny and sharp at any size. The default 400 x 300 placeholder is about 300 bytes of code.
You control the width and height (1 to 4,096 pixels), the background and text colors, the label, the font size and the corner radius. Colors accept any CSS value, such as #E5DFD7, rgb(200, 200, 200) or a name like lightgray. The label shows the size unless you type your own text. Font size 0 means automatic: one eighth of the shorter side, but never below 12 pixels. The preview updates as you type.
There are three ways to use it. The SVG markup can go straight into HTML. The URL-encoded data URI and the Base64 data URI both work in an img src or a CSS url(). Here the Base64 version is usually the shorter one. The URL-encoded version encodes every space and bracket, and for the default placeholder it is about 520 characters against about 430 for Base64. The label uses the viewer's default sans-serif font, so it can look slightly different on each system.
For a bitmap version, convert the download with SVG to PNG. To pick sizes that match a layout, try the Aspect Ratio Calculator.
Sources
Frequently Asked Questions
Related Tools
Image Resizer
Resize images to exact pixel dimensions with an optional aspect ratio lock, entirely in your browser.
Image and MediaAspect Ratio Calculator
Calculate and convert aspect ratios for images, videos, and screens. Find missing dimensions instantly.
Image and Media