Skip to content

Placeholder image generator

Put https://www.themes.dev/ph/600x400.svg in any image source and you get a 600 × 400 grey placeholder with its size on it. Add bg, fg, text, radius or font to change it; the builder writes the URL and the HTML, Markdown, Next.js and CSS code for you.

Size
Colours
Background
#
Text
#
Empty shows the size. Up to 80 characters.
Font
Preview: 1200 × 630, 1200 by 630 pixels

1200 × 630 px · SVG · 395 bytes

https://www.themes.dev/ph/1200x630.svg

URL options

The same URL works as a dummy image in mockups, tests and demo content. Every option goes in the query string, so the path keeps its .svg ending. The first value of an option counts; unknown options are ignored. Need a PNG? Convert the SVG with the SVG to PNG converter.

OptionValuesDefaultExample
size (path)1–4000 px, WIDTHxHEIGHT or one number for a squarerequired/ph/1200x630.svg, /ph/256.svg
bg3 or 6 hex digits, no #e4e4e7bg=18181b
fg3 or 6 hex digits, no #52525bfg=fff
textup to 80 characters; empty for nonethe size, e.g. 600 × 400text=Hero+image
radiuswhole px, up to half the shorter side0radius=16
fontsans, serif or mono (fonts on the device)sansfont=mono

What the service answers with

HeaderValue
Content-Typeimage/svg+xml; charset=utf-8
Cache-Controlpublic, max-age=31536000, immutable
Access-Control-Allow-Origin*
X-Content-Type-Optionsnosniff
Content-Security-Policydefault-src 'none'; style-src 'unsafe-inline'

The open CORS header means scripts on any site may fetch the image. The text is drawn with fonts already on the viewer's device, so it looks slightly different on macOS, Windows and Android.

Blocks with image slots to try your placeholders in

7 of 89 free, no account. All of them in UI Pro.

  • Hero (hero-01)01

    Hero

    hero-01 · Free. Journey-planner hero: from/to card with leave-at tabs, a day-out photo card and four quick-task tiles.

    Open hero-01
  • Larchwood Joinery (gallery-04)02

    Larchwood Joinery

    gallery-04 · Free. Bespoke fitted furniture in Leeds.

    Open gallery-04
  • 03

    All free blocks

    Every one with a live preview, filtered to the ones you can use for free first.

    See them all

Questions

How do I make a placeholder image with a URL?

Use https://www.themes.dev/ph/WIDTHxHEIGHT.svg as the image source, for example https://www.themes.dev/ph/600x400.svg. One number gives a square: https://www.themes.dev/ph/256.svg is 256 × 256. Add query options to change it: ?bg=18181b&fg=ffffff&text=Hero+image&radius=16.

Can I get a PNG or JPG instead of SVG?

Not from this service: it only makes SVG, because drawing PNGs would need an image library in the worker. Browsers show SVG anywhere an image goes (img, CSS backgrounds, Markdown). If you need a PNG, for an og:image or an app that refuses SVG, download the SVG and convert it with the SVG to PNG tool on this site.

Does it work with the Next.js Image component?

Yes, with the unoptimized prop, which the Next.js snippet in the builder adds. The browser then loads the SVG straight from this service. Without the prop, Next.js sends the image through its optimizer, which refuses SVG unless you set images.dangerouslyAllowSVG in next.config, and the host would also have to be listed in images.remotePatterns.

How do I switch from via.placeholder.com?

Change https://via.placeholder.com/600x400 to https://www.themes.dev/ph/600x400.svg. Colours work differently: placeholder.com puts them in the path (/600x400/000000/ffffff), here they are query options (?bg=000000&fg=ffffff). The output is SVG, not PNG, and it is served by our own worker at themes.dev, so it depends on this site being up.

What are the limits?

Each side is 1 to 4000 px; bigger or smaller numbers are clamped. The text is cut at 80 characters, control characters are removed and the rest is escaped, so it can't inject markup. Colours must be 3 or 6 hex digits without the #. A bad option answers with HTTP 400 and a message that names it.

Is it free?

Yes. No sign-up and no API key, and you may use the URLs in public projects. Nothing is saved: the image is drawn from the options in its URL, and the same URL always gives the same image, which is why browsers and CDNs may cache it for a year.

UI Pro

Build your next site from finished blocks

Every block, page template and website theme from €199, paid once, with every update and everything we add later. Not ready? The free blocks are open to everyone.

blocks
1401
page templates
55
website themes
29
The About page template from UI Pro, built from its blocks.

This card is a UI Pro block: Rooilijn (call-to-action-07).