Placeholder Image Generator

Generate custom placeholder images with solid colors, gradients, patterns, and text. Download as PNG instantly.

Last reviewed: April 2026

New to this tool? Click here for instructions

Quick Presets:

Adjust settings above and click Download to save your image.

Generate solid, gradient, text-labeled, or patterned placeholder images of any common size — from 320x180 hero stubs to 1200x630 Open Graph cards — entirely in the browser, with zero network requests and zero rate limits.

What This Tool Does

This tool generates raster placeholder images directly in your browser using the HTML5 Canvas API. You specify a width and height, choose a fill style (solid color, two-color gradient, repeating pattern, or text overlay), and the tool produces a downloadable PNG along with a copy-ready data URI you can paste straight into HTML, CSS, or a Markdown file. The output covers the dimensional and visual variety needed for mockups, wireframes, design comps, and "missing image" fallbacks across web, mobile, and print contexts.

Every common social and ad-tech dimension is one click away through the preset chips: 1200x630 for Open Graph and Twitter cards, 1080x1080 for Instagram square, 1080x1920 for Stories and Reels, 1280x720 for YouTube thumbnails, 1500x500 for X (Twitter) headers, 728x90 for IAB leaderboard ads, and 300x250 for medium rectangle units. Custom dimensions up to 4096x4096 are supported via the width and height inputs — large enough for almost any hero banner, retina-density poster, or print bleed area.

The tool runs 100% client-side. Once the page loads, nothing you enter — dimensions, colors, label text — leaves your browser. There's no API, no quota, no rate limit, and no need to reach a remote placeholder service like placehold.co or dummyimage.com that may go down, change behavior, or be blocked by corporate firewalls. 🔒

How to Use It

The workflow is short and most users land on a usable image within a few seconds, but each mode unlocks specific styling controls worth knowing about.

Pick a Mode

The four mode chips at the top — Solid, Gradient, Text, Pattern — determine which fields appear below. Solid renders a single fill color with optional label text; Gradient adds a second color picker and a direction selector (horizontal, vertical, diagonal, radial); Text is identical to Solid but emphasizes the label workflow; Pattern hides the gradient color but adds a pattern-type selector for stripes, dots, grid, or crosshatch overlays.

Set Dimensions

Type the target pixel dimensions directly into the Width and Height inputs, or click any preset chip to pre-fill both values. Presets are labeled with their canonical names (OG Image, Instagram Square, YouTube Thumb, Hero 1920x600) so you don't need to remember exact aspect ratios. Custom values up to 4096 pixels per dimension regenerate the canvas instantly.

Customize Colors and Text

The Background Color picker uses the browser's native color input — type a hex value directly, or use the eyedropper if your platform supports it. For Gradient mode, set both color stops independently. Text Overlay accepts any string up to 80 characters; leave it blank and the tool auto-fills the canvas with the current dimensions (e.g., 320 x 180), which is the most common placeholder convention. Font size auto-scales relative to the canvas size when you leave it at 0.

Download or Copy

Click Download PNG to save the image as placeholder-{width}x{height}.png. Click Copy Data URL to copy a base64-encoded data:image/png;base64,... string straight to your clipboard — paste it directly into a CSS background-image: url(...) declaration or an HTML <img src="..."> attribute. The image info line below the canvas displays the rendered size in kilobytes so you can judge whether the result is inline-friendly or should be served as a separate file.

Worked Example: A 320x180 Hero Placeholder vs. a 1200x630 OG Card

To illustrate the difference dimensions and styling make, here's a side-by-side construction of two very different placeholders for the same hypothetical article — one for the in-page hero image, one for the social-share Open Graph card.

The 320x180 Hero Placeholder

  1. Click the Thumbnail preset. This pre-fills Width to 400 and Height to 300 — close, but not quite right. Manually set Width to 320 and Height to 180 to match a 16:9 video-aspect thumbnail.
  2. Switch to Solid mode (it's the default). Set the Background Color to #6366f1 (indigo), keep Text Color at #ffffff (white), leave Font Size at 0 for auto-sizing.
  3. Type the label. Enter Article Hero in the Text Overlay field. The canvas immediately re-renders with the centered label.
  4. Inspect the data URI size. The info line reads roughly 320 x 180 - approx 3 KB PNG. At under 4 KB this is small enough to inline as a data URI in your HTML without ballooning page weight.
  5. Click Copy Data URL. Paste the result directly into your HTML: <img src="data:image/png;base64,iVBORw0KGgo..." alt="hero placeholder" width="320" height="180">. The image renders without any network request.

The 1200x630 OG Card

  1. Click the OG Image preset. Width and Height auto-fill to 1200 and 630.
  2. Switch to Gradient mode. Set Color 1 to #6366f1 (indigo), Color 2 to #10b981 (emerald), and Direction to Diagonal. The canvas re-renders with a smooth indigo-to-emerald wash.
  3. Enter the label. Type Article Title Goes Here in the Text Overlay field. The auto-sized font computes to roughly 75 pixels for the 1200-pixel-wide canvas.
  4. Compare data sizes. The info line now reads roughly 1200 x 630 - approx 12 KB PNG — four times the file size of the hero. At 12 KB this exceeds the practical inline-data-URI threshold, so download it instead.
  5. Click Download PNG. The browser saves placeholder-1200x630.png to your default downloads folder. Upload this to your CMS as the temporary og:image while waiting on real artwork.

Key takeaway: the same tool produces two very different deliverables for the same article — a tiny inline data URI for the in-page hero, and a downloadable raster file for the social card — because the dimensions dictate which delivery method is appropriate. Always check the kilobyte count before deciding to inline.

Common Use Cases

Storybook and Component Library Mocks

Storybook stories for image-bearing components (cards, avatars, hero banners, media tiles) need representative imagery to render meaningfully in isolation. Real production photography is rarely available during early component development, and pulling from a live CDN couples Storybook to network availability. A locally generated placeholder data URI dropped directly into the component's props in Component.stories.tsx produces a deterministic, network-independent render that ships cleanly to Chromatic, Loki, or any visual regression testing pipeline. Designers can scan a Storybook index and immediately see component variation at the correct dimensions and aspect ratios.

Wireframes and Design Comps

Before client assets arrive — and they always arrive later than the deadline assumes — designers and developers need to build out page layouts using stand-in imagery that communicates intent without misrepresenting final content. Generic placeholders with labels like "Hero 1920x600" or "Product Tile 400x400" preserve the layout's structural integrity while making explicit that the imagery is temporary. Stakeholders reviewing a wireframe see "this is placeholder content" at a glance and don't mistake the stand-in for finished art. Compare this with using real photos: clients invariably critique the photo choice rather than the layout, which derails the review.

Content Management System Testing

When testing how a CMS renders articles, products, or listings, you need varied images covering edge cases: portrait and landscape ratios, very wide banners, very tall vertical cards, monochrome and high-contrast color schemes. Generating a dozen placeholders programmatically — each labeled with its own dimensions — is faster than sourcing a dozen real photographs and reveals layout bugs that uniformly-sized stock images would mask. Test a product grid by stuffing it with 50 generated 400x400 squares of varying background colors; rendering glitches surface immediately.

Missing-Image Fallback Strategy

Production systems eventually encounter records with no associated image: a product without uploaded photography, a user profile without an avatar, an article whose hero image 404s. A generated SVG or PNG placeholder served as a fallback is preferable to a broken image icon or a layout collapse. The Aspect Ratio Calculator helps confirm that the fallback's dimensions match the slot it fills, preventing layout shift when the real image eventually loads.

Edge Cases and Limitations

Several technical constraints shape how placeholders behave in real deployment contexts. Understanding these prevents surprises during integration.

Data URI Size Limits

RFC 2397 doesn't formally cap data URI length, but browsers do. Chrome and Firefox handle data URIs up to roughly 2 MB without complaint; legacy Internet Explorer capped at 32 KB. The bigger practical issue is HTML payload bloat — every byte of a data URI lives inline in your HTML and gzips less efficiently than a referenced binary file. Keep inline data URIs under 4 KB; above that, serve the placeholder as a separate file referenced via <img src> instead.

SVG vs Raster Tradeoffs

This tool outputs PNG (raster) because the Canvas API is raster-native. SVG placeholders, by contrast, are vector — they scale to any size without quality loss and typically weigh a fraction of an equivalent raster image (200-800 bytes vs. 3-12 KB). Use the canvas-to-PNG output here when the consuming system requires raster (image-processing pipelines, formats that don't support SVG, design tools that prefer raster comps). For pure web use where SVG is supported, a hand-written SVG placeholder is usually smaller and crisper.

The CSS aspect-ratio Property

Modern browsers support aspect-ratio: 16 / 9; in CSS, which lets you reserve layout space without setting an explicit pixel height. Combined with a low-quality image preview (LQIP) data URI as background-image, this eliminates the need for a separately-sized placeholder file in many cases. The aspect-ratio property has been baseline since 2021 and is supported in every evergreen browser; for older browsers, the classic "padding-bottom percentage" trick still works as a fallback.

Lazy-Loaded Image Placeholders

When using loading="lazy" on an <img>, the browser delays fetching the image until it nears the viewport. During that delay, the slot is empty by default — unless you supply a placeholder via poster-style data URI, a CSS background, or a tiny SVG placeholder rendered as the initial src. The onload handler can then swap to the full-quality image. This pattern, common in Next.js Image and Gatsby's gatsby-image components, prevents the "blank rectangle followed by sudden pop-in" effect.

Blurhash and SQIP Alternatives

For preview-during-load use cases specifically, dedicated low-quality preview techniques outperform generic placeholders: blurhash encodes an image into a 20-30 character string that decodes to a soft color-matched blur; SQIP (SVG-based Quick Image Placeholder) uses primitive shapes to approximate the source image as a tiny SVG. These produce previews that match the eventual image's color palette, making the transition feel natural. Generic placeholders are a better fit for layout-stage mockups where no real image exists yet.

Behind the Scenes: The Placeholder Image History and Canvas Pipeline

A Brief History of Placeholder Services

The lineage of online placeholder generators begins with placehold.it, launched in 2009 as a simple HTTP service: request placehold.it/300x200 and receive a gray PNG with the dimensions printed across it. The service shut down in 2020 but was succeeded by placehold.co with the same URL pattern and added color and text controls. dummyimage.com, launched in 2007 by Russell Heimlich, offered similar functionality with finer-grained color controls and remains operational today. placekitten.com (2010) and placedog.net introduced themed photo placeholders, though placekitten formally retired in 2025. picsum.photos, launched in 2017 by David Marby, serves randomized stock photographs from a curated pool and remains one of the most popular live-photo placeholder services in active development.

Why a Client-Side Tool Beats a Remote Service

Remote placeholder services have several recurring failure modes: the service goes down or changes URL patterns (placehold.it → placehold.co broke many tutorials), corporate firewalls block external image hosts, CORS policies prevent canvas-based manipulation of the returned image, and CDN latency adds visible delay to design previews. A purely client-side generator like this one sidesteps every one of those failure modes — the placeholder is materialized in the browser the instant you change a setting, and the only network dependency is the one-time initial page load.

The Canvas API Pipeline

The full generation pipeline runs through four Canvas API stages. First, an HTMLCanvasElement's width and height are set to the requested dimensions; this allocates the underlying pixel buffer. Second, a 2D rendering context is obtained via canvas.getContext('2d'), exposing the drawing primitives. Third, the fill operation paints the background: fillRect for solids, createLinearGradient or createRadialGradient for gradients, and a loop of strokeStyle + moveTo/lineTo + stroke calls for patterns. Fourth, if a text overlay is requested, fillText renders the label using a computed font size, with textAlign: 'center' and textBaseline: 'middle' for perfect centering and a subtle shadow for legibility on busy backgrounds.

From Canvas to Data URI to Download

The final stage converts the raster buffer to a downloadable PNG via canvas.toDataURL('image/png'), which returns a base64-encoded data URI of the form data:image/png;base64,iVBORw0KGgo.... This same string is used three ways: as the href on a hidden <a download> element to trigger a download, as the value copied to the clipboard via the Clipboard API for the "Copy Data URL" action, and to estimate the resulting file size (data URI length × 0.75, divided by 1024 yields kilobytes). The conversion runs in O(width × height) — fast enough to feel instant even at the 4096x4096 ceiling.

Visual Comparison: Common Placeholder Dimensions and File Sizes

Placeholder size vs. PNG file size chart Bar chart comparing PNG file size in kilobytes across common placeholder dimensions, from 320x180 hero thumbnails up to 1920x1080 hero banners. Approximate PNG size (KB) by placeholder dimensions 40 30 20 10 0 PNG size (KB) 3 4 5 10 12 18 32 320x180 728x90 400x400 1080² 1200x630 1920x600 1920x1080 4 KB inline threshold Inline-safe (<4KB) Borderline (5-12KB) Serve separately (15-25KB) Large file (>25KB)
Approximate PNG file size (kilobytes) for representative placeholder dimensions, all rendered with a solid background plus a centered text label. Actual size varies modestly with color complexity and label length, but the magnitude trend holds. Dimensions to the left of the red 4 KB threshold inline cleanly as data URIs; dimensions to the right should be served as separate files.

Comparison: This Tool vs. Placeholder Services and LQIP Techniques

The placeholder ecosystem spans live-photo APIs, generic dimension labelers, and low-quality preview generators. Each occupies a different niche; choosing the right one depends on whether you need a generic dimension stand-in, a representative-looking color preview, or a real photograph.

Placeholder Generation Approaches: Tradeoffs Across Output Type, Network, and Use Case
Approach Output Network Required Typical Size Best For Limitation
This tool (Canvas) PNG / data URI No (after page load) 3-30 KB Mockups, design comps, CMS testing Raster output only; not vector-scalable
placehold.co PNG (via HTTP) Yes (every request) Service-controlled Quick HTML tutorials, demos External dependency; CORS-restricted; goes down
dummyimage.com PNG, GIF, JPG (via HTTP) Yes Service-controlled Quick color-specified placeholders External dependency; URL-parameter syntax only
picsum.photos Real photographs (via HTTP) Yes 50-500 KB Mockups needing realistic imagery Photos are random; legal/attribution considerations
Blurhash Decoded canvas blur No (post-encoding) 20-30 byte string Loading-state preview matching final image Requires encoder step on real image first
LQIP (low-quality preview) Tiny JPG (20-30px wide) No (inline) 200 bytes - 2 KB Progressive image loading Color matches final but is heavily pixelated
SQIP SVG with primitive shapes No (inline) 800 bytes - 4 KB Stylized loading preview Encoder is heavy; requires source image
Unsplash Source Real photographs (via HTTP) Yes 100-800 KB Theme-tagged real photos (deprecated 2024) Service deprecated; use Unsplash API instead
Blurhash, LQIP, and SQIP are progressive-loading techniques that preview the final image, not stand-in generators. This tool, placehold.co, and dummyimage.com are stand-in generators producing imagery unrelated to any final asset.

For most design and development workflows, the right answer combines two approaches: this tool for layout-stage mockups where no real image exists yet, and blurhash or LQIP for production loading states once the real image is in hand. The remote placeholder services (placehold.co, dummyimage.com) remain useful for one-line examples in tutorials and documentation, where requiring readers to set up a local tool is overkill.

Related Tools

Placeholder image generation pairs naturally with several adjacent tools in the design and developer workflow. The Aspect Ratio Calculator helps work out the matching width or height when only one dimension is fixed — useful for sizing placeholders to specific responsive breakpoints. The Color Converter translates hex values used in the color pickers here into HSL, RGB, or named colors so they can be reused across CSS variables and design tokens.

For converting any final raster output into different formats, the Image Color Picker samples pixel-level colors from generated placeholders, useful for matching brand palettes. The Color Palette Extractor derives a coherent color scheme from any source image — handy when you want gradient color stops that harmonize with an existing brand asset.

Frequently Asked Questions

Match the final asset's intended dimensions whenever possible. For Open Graph cards use 1200x630, for hero banners 1920x600 or 1920x1080, for blog thumbnails 1280x720, and for square social posts 1080x1080. Using exact target dimensions ensures the layout you build during design accurately reflects how the real image will render. When the final size isn't yet known, default to 16:9 aspect ratio at 1280x720 — it's the most common ratio across web video, hero banners, and slide decks.
Use SVG for inline placeholders embedded directly in HTML or CSS as data URIs; SVG scales infinitely, weighs only a few hundred bytes, and renders crisp at any zoom. Use PNG when the placeholder must be processed by an image pipeline that requires raster input, when you need pixel-perfect dimensions, or when the consuming framework only supports raster formats. This tool outputs PNG because the Canvas API is raster-native; for pure SVG output, a hand-written or templated SVG is usually smaller and more flexible.
Placeholders left in production can hurt SEO through poor Largest Contentful Paint scores, Cumulative Layout Shift if dimensions aren't declared, and missing alt text. Used correctly as low-quality image previews (LQIP) with proper width/height attributes and meaningful alt text, they can actually improve perceived performance and Core Web Vitals scores. The key is replacing them with real assets before launch — Google's image-rich-results guidelines specifically penalize pages whose primary visual content is generic placeholder imagery.
Blurhash is a compact string representation (typically 20-30 characters) that encodes a blurred preview of an image. The browser decodes the string into a small canvas, producing a soft color-accurate blur during image load. Unlike a generic placeholder, blurhash previews the actual final image's color palette, making the load transition feel natural rather than abrupt. Generic placeholders are the right choice at the design stage when no final image exists yet; blurhash is the right choice in production once you have the real image to encode.
RFC 2397 sets no formal upper bound, but browsers cap practical usage around 2 MB; Internet Explorer historically capped at 32 KB. For inline placeholders, keep data URIs under 4 KB to avoid bloating the HTML payload and to ensure efficient gzip compression. SVG placeholders typically weigh 200-800 bytes; raster PNG placeholders larger than 8 KB should usually be served as separate files instead. The info line below this tool's canvas shows the rendered file size so you can apply this 4 KB rule of thumb at a glance.
Raster placeholders (PNG, JPG) are bound to a fixed pixel grid; rendering them above their native resolution interpolates pixels, producing the soft-edged or jagged look commonly called pixelation. To fix this, either generate the placeholder at the largest size it will be displayed at, account for device pixel ratio (multiply dimensions by 2x or 3x for retina displays), or switch to SVG, which scales mathematically without quality loss. A retina-friendly approach for a 400x300 display slot is to generate the placeholder at 800x600 or 1200x900 and let the browser downscale.
Unsplash Source (source.unsplash.com) was deprecated in 2024 and now redirects to the public Unsplash site. The recommended approach is to use the official Unsplash API with proper attribution, or rely on locally generated placeholders for development. Other photo placeholder services like picsum.photos and placedog.net remain operational but require careful attribution handling for production use. For most internal mockup and design comp work, a locally generated placeholder from this tool avoids the licensing and attribution complications entirely.
No. A placeholder image occupies the slot where a specific image will eventually appear; it has fixed dimensions matching the final asset and is replaced when the image loads. A skeleton screen is a content-shape outline displayed across an entire page or component during initial render; it represents the layout structure rather than a specific image and typically animates with a shimmer to signal that loading is in progress. Use placeholders when one specific image is loading; use skeleton screens when an entire view is loading data from an API.