Placeholder Image Generator
Generate placeholder images with custom dimensions, text, and colours
/v1/image/placeholder
curl -X POST "https://image.toolkitapi.io/v1/image/placeholder" \
-H "Content-Type: application/json" \
-d '{"width": 800, "height": 600, "text": "Hero Image", "bg_color": "#3498db", "text_color": "#ffffff"}'
import httpx
resp = httpx.post(
"https://image.toolkitapi.io/v1/image/placeholder",
json={"width": 800, "height": 600, "text": "Hero Image", "bg_color": "#3498db", "text_color": "#ffffff"},
)
print(resp.json())
const resp = await fetch("https://image.toolkitapi.io/v1/image/placeholder", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({"width": 800, "height": 600, "text": "Hero Image", "bg_color": "#3498db", "text_color": "#ffffff"}),
});
const data = await resp.json();
console.log(data);
# See curl example
{
"image": "iVBORw0KGgoAAAANSUhEUg...(base64 data)...",
"format": "png",
"size": {"width": 800, "height": 600},
"label": "Hero Image"
}
Try It Live
Description
How to Use
1. Set `width` and `height` for the desired image dimensions (1–4000 pixels each).
2. Optionally provide custom `text` — defaults to "WxH" (e.g. "800x600") if omitted.
3. Set `bg_color` and `text_color` as hex codes to match your design system.
4. Choose the output `format`: png, jpeg, or webp.
About This Tool
Use the Placeholder Image Generator to create dummy images for UI mockups, wireframes, and development environments. Specify exact dimensions, custom label text, background colour, and text colour.
The GET variant returns raw image bytes, so you can use it directly as an `` URL in HTML — no server-side code required. The POST variant returns base64 JSON for programmatic use.
Images scale their text size automatically based on dimensions, ensuring the label is always readable regardless of image size.
Why Use This Tool
- UI wireframing — Generate correctly sized placeholders for layout prototyping
- Email templates — Use placeholder images during template development
- Documentation — Create illustrative dimension diagrams
- Testing — Generate test images of specific sizes for upload validation
- Design mockups — Quickly fill layouts with branded placeholder content
Frequently Asked Questions
Can I use the GET endpoint directly in HTML?
What is the maximum image size?
How is the text sized?
Start using Placeholder Image Generator now
Get your free API key and make your first request in under a minute.