Free tool · Design and colour
Placeholder image generator
Type a width and a height, choose colors and an optional label, and download the placeholder as PNG, JPG or SVG. You can also copy the SVG code, a data address or an img tag. Everything is made in your browser.
- Free
- No sign-up
- Runs in your browser
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400" viewBox="0 0 600 400"><rect width="600" height="400" fill="#cccccc"/><path d="M0 0L600 400M600 0L0 400" stroke="#555555" stroke-opacity="0.35" stroke-width="2" fill="none"/><text x="300" y="200" font-family="Arial, Helvetica, sans-serif" font-size="98" font-weight="700" fill="#555555" text-anchor="middle" dominant-baseline="central">600 x 400</text></svg>
- Shape
- 3:2
- SVG file
- 422 bytes
- Data address
- 551 characters
- Text contrast
- 4.6 : 1
How to use the Placeholder Image Generator
- Type the Width and Height in pixels, or press a size under Common ad sizes.
- Pick the Background and Text and lines colors, a Pattern and a Font. Add Your own text or leave it empty to show the size.
- Press Download PNG, Download JPG or Download SVG.
- To paste the picture straight into code, press Copy SVG code, Copy data address or Copy img tag.
How do I create a placeholder image of a given size?
Type the width and the height, and the picture is ready. The page accepts whole numbers from 1 to 4,096 pixels and draws a flat rectangle with the size written in the middle. A 600 by 400 pixel placeholder has a shape of 3:2 and holds 0.24 megapixels. Its label is 98 pixels high, picked so that the words fill most of the width without touching the edges.
The page makes the file for you to keep. It does not host images at a web address, so there is no link that other sites can load on every visit. Save the file, put it in your project, and it stays there whatever happens to this page. That is also the safer habit for a prototype, because a placeholder that loads from another server breaks when that server is down or blocked.
The largest picture is 4,096 by 4,096 pixels, which is exactly 16,777,216 pixels and the most a phone browser can usually hold in one canvas. A size outside the range gets a message and the previous picture stays on screen.
What are the common ad and banner sizes?
Google AdSense lists fixed ad units such as the medium rectangle at 300 by 250 pixels, the leaderboard at 728 by 90 and the half page at 300 by 600. The table gives the sizes and names the page offers as buttons, with the shape of each and the weight of its SVG file. The sizes and names come from the AdSense help page named under the sources, which I read on 27 November 2026. That page can change, so check it before you build a layout around one size.
A placeholder of the right size shows you how much room an ad will take before you have any ad code. Put a 300 by 250 picture in the sidebar and a 728 by 90 picture above the content, and you see the page the way a visitor will. The text on each picture is its own size, so a screenshot of the layout also tells a designer which slot is which.
A wide, short unit leaves little room for a label. At 728 by 90 pixels the label is 27 pixels high, limited by the height, while the 600 by 400 picture above gets 98. Below 8 pixels the page leaves the text out, because it would not be readable.
| Size (px) | Name | Shape | Megapixels | SVG with size label |
|---|---|---|---|---|
| 300 x 250 | Medium rectangle | 6:5 | 0.07 | 318 bytes |
| 336 x 280 | Large rectangle | 6:5 | 0.09 | 318 bytes |
| 728 x 90 | Leaderboard | 364:45 | 0.07 | 313 bytes |
| 300 x 600 | Half page | 1:2 | 0.18 | 318 bytes |
| 468 x 60 | Banner | 39:5 | 0.03 | 313 bytes |
| 160 x 600 | Wide skyscraper | 4:15 | 0.10 | 317 bytes |
| 970 x 250 | Billboard | 97:25 | 0.24 | 318 bytes |
| 320 x 100 | Large mobile banner | 16:5 | 0.03 | 317 bytes |
| 320 x 50 | Mobile leaderboard | 32:5 | 0.02 | 313 bytes |
Can I use a data address as a placeholder image?
Yes. A data address holds the whole picture inside the src attribute, so the page needs no extra file. Press Copy data address, and paste it as the src of an image. The 600 by 400 placeholder is 421 characters long as a data address, and the whole img tag is 476 characters. Press Copy img tag to get the tag with width, height and alt text already in place.
The page uses SVG for data addresses because SVG is text, so it stays short. The SVG itself is 318 bytes. A PNG of the same size is a binary file that would grow by a third when turned into base64 text. Only a few characters are escaped in the SVG address, which keeps it readable and lets it sit inside double quotes in HTML.
Use a file when the same picture appears many times, since the browser can cache one file, and a data address when you want one self-contained snippet in a demo, an email template test or a code sample. Never put a large photo into a data address.
Is SVG or PNG better for a placeholder?
SVG is better when the placeholder goes on a web page, and PNG or JPG is better when a tool asks for a normal picture file. An SVG stays sharp at any size, weighs a few hundred bytes and can be edited as text. A PNG has fixed pixels. JPG is there for upload forms that refuse anything else.
The three files come from one drawing. The page builds the SVG, and for PNG and JPG it draws that same SVG on a canvas at the exact pixel size you typed, so the formats look alike. One difference remains. SVG text uses the font on the device that shows it, while PNG and JPG fix the letters on your device when you press the button.
Colors are your own. The default background is light grey and the default text is dark grey, which gives a ratio of 4.6 : 1. Pale text on a pale background is the usual mistake with placeholders, and it makes the size unreadable in a screenshot.
How do I keep the placeholder text readable?
Pick a text color that differs strongly in brightness from the background. Level AA of WCAG success criterion 1.4.3 sets two minimums: 4.5 : 1 for ordinary body text, and 3 : 1 once the text counts as large. Large means 18 point or bigger, or 14 point in bold, which works out to roughly 24 and 18.5 CSS pixels. The page prints the ratio of your two colors under the result.
Labels on a placeholder are bold and usually large, so the 3 : 1 line often applies. The ratio runs from 1 : 1 for two identical colors to 21 : 1 for black on white. Dark grey on the default light grey gives 4.6 : 1, the same grey on white gives 7.5 : 1, and black on white gives 21.0 : 1.
The Crossed lines pattern is the old wireframe look and the Grid pattern shows the proportions at a glance. Both use your text color at about a third of its strength, so they never fight with the label.
Use it with
- Image Resizer: resize by pixels or percent.
- Color Contrast Checker: WCAG contrast ratio.
- Image to Base64: encode an image as a data URI.
Questions
How do I create a placeholder image of a specific size?
Type the width and height in pixels, or press a size button, and download the PNG, JPG or SVG. Sizes from 1 to 4,096 pixels work.
What are the common ad banner sizes?
Google AdSense lists fixed units such as 300 x 250 (medium rectangle), 728 x 90 (leaderboard), 300 x 600 (half page) and 320 x 50 (mobile leaderboard). The page has a button for each.
Can I use a data address as a placeholder?
Yes. Press Copy data address or Copy img tag. The 600 x 400 example is 421 characters as a data address.
SVG or PNG for a placeholder?
SVG for web pages, because it is tiny and stays sharp. PNG or JPG when an upload form or a design tool needs a normal picture file.
Does the page host the image at a link?
No. It makes files and code on your device. There is no web address to hotlink.
Is anything sent to a server?
No. The picture is drawn in your browser, and the downloads are made there too.
Sources
The tool's results are computed in your browser by the code on this page, using the sources listed above; the explanations are checked against the tool's own output.