Skip to content

Placeholder Image Generator

Make a placeholder image at any size from 16 to 4,096 px. Set the background, text color and label, then download SVG or PNG or copy a data: URL.

Placeholder preview, 1200 by 630 pixels, labeled 1200×630

1,200 × 630 px. The preview is scaled down to fit when the image is larger than this box. SVG is 335 B.

Sizes

16 to 4,096 px

16 to 4,096 px

Empty: uses #ffffff, the better contrast on this background.

Empty: shows the size, 1200×630.

SVG markup
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 630" width="1200" height="630">
  <rect width="1200" height="630" fill="#1d2671"/>
  <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="system-ui, -apple-system, sans-serif" font-weight="600" font-size="76" fill="#ffffff">1200×630</text>
</svg>
data: URL
data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201200%20630%22%20width%3D%221200%22%20height%3D%22630%22%3E%0A%20%20%3Crect%20width%3D%221200%22%20height%3D%22630%22%20fill%3D%22%231d2671%22%2F%3E%0A%20%20%3Ctext%20x%3D%2250%25%22%20y%3D%2250%25%22%20dominant-baseline%3D%22middle%22%20text-anchor%3D%22middle%22%20font-family%3D%22system-ui%2C%20-apple-system%2C%20sans-serif%22%20font-weight%3D%22600%22%20font-size%3D%2276%22%20fill%3D%22%23ffffff%22%3E1200%C3%97630%3C%2Ftext%3E%0A%3C%2Fsvg%3E

01 · Definition

What is a placeholder image?

A placeholder image is a stand-in with the same dimensions as the picture that will eventually go in a layout. It is usually a flat color with its size or a short label written on it, so a design or prototype can be built and reviewed before the real photography or artwork exists.

02 · Overview

How the Placeholder Image Generator works

This placeholder image generator is for mockups, design systems and demo content. Set the width and height (16 to 4,096 px each), a background color, a text color and a label of up to 60 characters. The image is a flat color with centered text. Download it as SVG or as a PNG at the exact pixel size, or copy the SVG markup or a data: URL to paste into an <img> tag. The image is built in your browser, so nothing has to be hosted.

03 · Guide

Placeholder image size presets

Six presets fill in a width and height; any size from 16 to 4,096 px can be typed instead. The label is drawn at 12% of the shorter side, with a minimum of 10px, so it stays readable on small images.

The label sizes were computed by running the tool's SVG builder for each preset. With the default label, which is the image's own dimensions, the SVG file is 331 to 335 bytes for every preset, because it is only a rectangle and one line of text.

PresetSizeAspect ratioLabel size
OG image1200 × 63040:21 (about 1.9:1)76px
Square600 × 6001:172px
Avatar128 × 1281:115px
Card 4:3800 × 6004:372px
Banner 21:91680 × 72021:986px
Thumbnail320 × 18016:922px
Built-in size presets

04 · Use cases

When to use the Placeholder Image Generator

  1. 01

    Fill a hero or card grid with correctly sized placeholders during design

  2. 02

    Get a 1200×630 placeholder for an Open Graph image slot

  3. 03

    Build a design system showcase with consistent placeholder shapes

  4. 04

    Label a placeholder 'avatar', 'cover' or 'thumb' so reviewers know what goes there

05 · Examples

Placeholder Image Generator examples

1200×630, background #1d2671, no label (the default)

ex 01

placeholder-1200x630.svg, 335 bytes, white text reading 1200×630

With no label the image shows its own size. The text color is picked for contrast.

128×128, label 'avatar'

ex 02

placeholder-128x128.png at exactly 128 × 128 px

A square for an avatar slot, saved as a PNG.

1920×1080, label 'hero'

ex 03

placeholder-1920x1080.svg or .png at exactly 1920 × 1080 px

16:9 at full size, for checking a hero crop before the real photography exists.

400×400, data: URL output

ex 04

data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http…

You can paste it straight into an img src, so there is no file to manage.

Width 99999

ex 05

"99,999 is above the maximum. Using 4,096 px."

Sizes outside 16 to 4,096 px are clamped, and the field says so.

06 · FAQ

Placeholder: frequently asked questions

Why generate a placeholder file instead of linking to a placeholder service?

A local file or data: URL works offline, adds no third-party request to your page, and cannot break if an external service is slow, rate-limited or shut down. This tool builds the image in your browser and gives you the file or markup to keep.

What does the image contain?

It contains a flat background color and one line of centered text in a system font, sized at 12% of the shorter side. It is not a photo. If you need random photographs as stand-ins, use a stock photo source instead.

What format should I use?

Use SVG for sharp scaling and a file of a few hundred bytes. Use PNG when you need a raster file for something that doesn't accept SVG, such as some slide and PDF tools. Use a data: URL for inline embedding with no file at all. The SVG uses a system font, so the label's exact shape can differ slightly between devices; the PNG is rendered in your browser and is fixed.

What sizes are supported?

Width and height can each be from 16 to 4,096 px, in whole pixels. A value outside that range is clamped to the nearest limit and the field tells you what was used. The on-page preview is scaled down to fit; downloads are always the exact size you entered.

Should placeholder images have alt text?

If the image is standing in for something decorative, use alt="" so assistive tech skips it. If it represents real content that will exist later, such as a product photo or an article thumbnail, write the alt text you'd eventually want.

How do I stop placeholders causing layout shift?

Set width and height attributes on the img element matching the real aspect ratio. Browsers use them to reserve space before the image loads, which keeps Cumulative Layout Shift down. It works for placeholders and real images alike.

Can I use a data: URL in production?

For small SVGs, yes. It saves a request and the markup compresses well. Avoid it for base64 PNGs: base64 adds about a third to the file size and the bytes sit in your HTML, so they can't be cached separately. Anything above a few kilobytes belongs in its own file.

07 · Reference

Specs and further reading

These are the primary sources this tool follows. Where a specification defines the behaviour, we link the specification, not a summary of it.

  • <img>: The Image Embed element

    MDN Web Docs. Reference for width, height, and the attributes that prevent layout shift.

  • data: URLs

    MDN Web Docs. Syntax of the data: URL the tool copies.

  • Images Tutorial

    W3C WAI. How to describe decorative and informative placeholder images correctly.

08 · More

Tools that pair with Placeholder

Last updated .