How to use
- Press a common size button or enter the width and height. Use the ⇄ button to swap them.
- Choose the background and text colors, as
#rgb,#rrggbbor with the color picker. Pick text color from the background chooses black or white, whichever has the higher contrast. - Type the text for the image. Leave it empty to show the size, such as
640 × 360. Line breaks give up to 5 lines. - Pick PNG or SVG and download. For SVG you can also copy the code or the
imgtag below straight into HTML.
Options
| Option | Description |
|---|---|
| Size | 1px or more per side. Up to 4,096px for PNG and 10,000px for SVG |
| Font size | Automatic by default, fitted to the image and the text length. Turn it off to set px yourself |
| Diagonal lines | Draws an X between the four corners, the classic placeholder look |
| Bold | Draws the text in bold |
| Format | PNG is a picture file that opens anywhere, SVG is a vector that stays sharp at any size |
PNG or SVG
- PNG: when you need an image file, for example for a CMS, a chat app or slides that require an upload.
- SVG: just a rectangle and a few lines of text, so it is a few hundred bytes. It stays sharp at any size and the code can go straight into HTML or CSS.
SVG text is drawn with the font on the viewing device, so the letter shapes can differ a little from the PNG. The font stack is Arial first, then system fonts for Korean.
Dropping it into HTML
The img tag is one line with the SVG embedded as a base64 data: URL. It is handy for trying a layout without uploading a file. A 300 × 200 image looks like <img src="data:image/svg+xml;base64,..." width="300" height="200" alt="300 × 200">.
Replace placeholder images with real ones before a page goes live, and update the alt text to describe the real image.
How the font size is chosen
Automatic mode keeps the text within about 84% of the image width and about 70% of the height including all lines, and never above 40% of the shorter side. Width is estimated at 0.6em for letters and digits, 0.35em for spaces and 1em for Korean or Chinese characters. A 300 × 200 image gets 51px, 800 × 600 gets 137px and 1920 × 1080 gets 264px.
Contrast check
The WCAG contrast ratio of text against background is shown. The default #cccccc background with #666666 text is about 3.6 : 1. Below 3 : 1 you get a notice that the text may be hard to read.
Frequently asked questions
How is this different from services like placehold.co?
The image is made in this browser instead of being fetched from an external server. It works offline and no request goes to any address.
Can I make a transparent PNG?
This tool always fills the background. For a transparent background, delete the <rect ...> line from the SVG code.
Can I use Korean text?
Yes. PNG is drawn with the Korean font of the device that made it and SVG with the font of the viewing device. On a device without a Korean font the SVG text may not display properly.
Can I make very large images?
PNG goes up to 4,096px per side. For anything larger save an SVG, which accepts up to 10,000px.
Related tools: Image Resize, SVG to PNG, Image to Base64, Color Converter, Social Image Size Guide.
The image is generated in your browser and never sent to a server.