Placehold.co API
Free placeholder image API with no key: generate images at any size with custom colours, text and format straight from a URL. No JSON needed. Tested example.
Endpoint tested and returned HTTP 200 on 19 Aug 2026
What is the Placehold.co API?
Placehold.co is a free, key-free placeholder image API that generates a solid-colour image at any dimensions from a URL, with customisable background, text colour, caption and output format.
This is the classic grey-box placeholder, generated on demand from the URL. Unlike photo-based placeholder services it produces a plain image with the dimensions written on it, which is exactly what you want when checking layout and aspect ratios rather than evaluating real imagery.
It supports SVG output, which is worth using during development: an SVG placeholder is a fraction of the size of a PNG, renders instantly, and scales without blurring.
Quick facts
- Base URL
https://placehold.co- Authentication
- No API key required.
- Rate limit
- No published limit.
- Pricing
- Free, including commercial use.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Placehold.co API
Every request below was executed against the live API on 19 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. Generate a placeholder image
GET https://placehold.co/600x400/png
curl 'https://placehold.co/600x400/png'const res = await fetch("https://placehold.co/600x400/png");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://placehold.co/600x400/png", timeout=20)
res.raise_for_status()
print(res.json())# This endpoint returns image/png, not JSON.
# The response body is the image itself, so it can be used directly as an
# <img src="..."> or saved to a file — there is nothing to parse.
#
# Verified: HTTP 200, Content-Type: image/pngParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
<width>x<height> | path | Required | Dimensions. A single number produces a square. 600x400 |
<bg>/<fg> | path | Optional | Background and text colours as hex without the hash. 000000/FFFFFF |
<format> | path | Optional | png, jpg, gif, webp or svg as a file extension. png |
text | string | Optional | Custom caption. Use + for spaces. Hello+World |
font | string | Optional | Font family for the caption. roboto |
Response fields
(image)image- The response body is the generated image, not JSON.
What you can build with the Placehold.co API
- Block out layouts and check aspect ratios during development
- Fill wireframes and mockups with correctly sized boxes
- Test responsive image behaviour at specific dimensions
- Generate lightweight SVG placeholders that load instantly
Common errors and how to fix them
Text not appearing
Spaces were not encoded.
Fix: Use + or %20 for spaces in the text parameter.
Colours ignored
Hex values included a # character.
Fix: Pass colours as bare hex, e.g. /000000/FFFFFF.
Placehold.co API — frequently asked questions
Is there a free placeholder image API?
Yes. Placehold.co generates placeholder images at any size directly from a URL, with no API key and no signup.
Can I customise the colours and text?
Yes. Put background and foreground hex colours in the path without the hash, and pass a `text` parameter with + for spaces.
Should I use SVG or PNG placeholders?
SVG during development — it is far smaller, renders instantly and scales cleanly. Use PNG only if something in your pipeline cannot handle SVG.
How is this different from Lorem Picsum?
Placehold.co generates plain coloured boxes with the dimensions written on them, which is better for checking layout. Lorem Picsum returns real photographs, which is better for judging a design's final feel.
Tools that pair with this API
Image Cropper
Crop images online to an exact rectangle with pixel-precise x, y, width and height inputs or aspect-ratio presets. Free, private and browser-based.
Color Picker
Pick any color and get its HEX, RGB and HSL values instantly. Free online color picker with shades, tints and one-click copy for designers and developers.
Alternatives to Placehold.co API
If Placehold.co does not fit, these photography & design apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| Metropolitan Museum of Art | Free Metropolitan Museum of Art API with no key: 470,000+ artworks with high-resolution public-domain images, artist data and full object metadata. Tested. | No key | No | 19 Aug 2026 |
| Art Institute of Chicago | Free Art Institute of Chicago API with no key: 130,000+ artworks with IIIF images, colour data, artist info and rich metadata. Well documented. Tested example. | No key | Yes | 19 Aug 2026 |
| Cleveland Museum of Art | Free Cleveland Museum of Art API with no key: 60,000+ artworks with open-access images, provenance, exhibition history and full metadata. Tested curl example. | No key | No | 19 Aug 2026 |
| DiceBear Avatars | Free avatar generator API with no key: deterministic SVG or PNG avatars from any seed, in 30+ styles with customisable colours. Tested curl example. | No key | Yes | 19 Aug 2026 |
| PlaceKeanu | Free novelty placeholder service with no key: dimensions in the path return a Keanu Reeves placeholder, with greyscale and young-Keanu variants. Tested example included. | No key | No | 21 Aug 2026 |
| Readme Typing SVG | Free animated SVG API with no key: generate a typing-and-deleting text animation from URL parameters, embeddable anywhere an image works. Tested example included. | No key | No | 21 Aug 2026 |
Placehold.co is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 19 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.