Tailwind-Native API
Every query parameter is named after a Tailwind CSS utility class. If you know Tailwind, you already know the API.
Tailwind CSS
<div class="
bg-blue-500
text-color-white
text-align-left
font-weight-bold
letter-spacing-wide
opacity-80
blur-sm
brightness-110
contrast-125
saturate-150
border-2
rounded-lg
grayscale
">FreePlaceholder API
/600x400?
bg=3b82f6
text-color=ffffff
text-align=left
font-weight=bold
letter-spacing=wide
opacity=80
blur=2
brightness=110
contrast=125
saturate=150
border=4
rounded=lg
grayscalebgBackground
Any hex color
text-colorText Color
Any hex color
textText
Any string
text-sizeFont Size
Any px value
text-alignText Align
left, center, right
text-transformText Transform
uppercase, lowercase, capitalize
text-decorationText Decoration
underline, overline, line-through
letter-spacingLetter Spacing
tighter, tight, wide, wider, widest
font-weightFont Weight
thin, light, normal, medium, semibold, bold, extrabold, black
opacityOpacity
0–100
blurBlur
0–100 px
brightnessBrightness
0–200 (100 = normal)
contrastContrast
0–200 (100 = normal)
hue-rotateHue Rotate
0–360 degrees
invertInvert
true / false
saturateSaturate
0–200 (100 = normal)
sepiaSepia
true / false
grayscaleGrayscale
true / false
borderBorder Width
Any px value
border-colorBorder Color
Any hex color
border-styleBorder Style
solid, dashed, dotted, double, none
roundedBorder Radius
sm, md, lg, xl, 2xl, 3xl, full, or px
Try It
Adjust the parameters below to see a live preview.
Dimensions & Format
Colors & Text
Border & Rounded
Filters
https://freeplaceholder.com/600x400Placeholder Images
Generate placeholder images by specifying dimensions in the URL.
Examples
https://freeplaceholder.com/600x400https://freeplaceholder.com/600x400.pnghttps://freeplaceholder.com/1920x1080.webphttps://freeplaceholder.com/600x400?bg=3b82f6&text-color=ffffffhttps://freeplaceholder.com/800x600?text=Hello+World&text-size=48Snippet images
Open Graph–style cards: default 1200×630 PNG, with title, subtitle, CTA, optional logo URL, and the same Tailwind-style styling as placeholders.
Examples
https://freeplaceholder.com/snippethttps://freeplaceholder.com/snippet.svghttps://freeplaceholder.com/snippet?title=Ship+faster&subtitle=API-first+placeholders&cta=Read+the+docshttps://freeplaceholder.com/snippet?width=800&height=420&bg=1e293b&text-color=f8fafc&title=Compact+cardAvatars
Generate circular avatar images from names or initials.
Examples
https://freeplaceholder.com/avatar/John+Doehttps://freeplaceholder.com/avatar/alice.png?size=256https://freeplaceholder.com/avatar/Bob?bg=ef4444&text-color=ffffffAPI Reference
Placeholder Images
| URL Pattern | Description |
|---|---|
| /{W}x{H} | SVG placeholder (default format) |
| /{W}x{H}.{fmt} | Specific format: .svg, .png, .jpg, .webp |
| /{W}x{H}?bg={hex}&text-color={hex} | Custom hex colors via query params |
Snippet images (Open Graph)
| URL Pattern | Description |
|---|---|
| /snippet | 1200×630 PNG (default size and format) |
| /snippet.{fmt} | Same as /snippet with format: .svg, .png, .jpg, .jpeg, .webp |
| /snippet?title=…&subtitle=…&cta=… | Headline, subheading, and call to action |
| /snippet?logo={https-url} | Raster logo from a public HTTPS URL (PNG, JPEG, GIF, WebP) |
Avatars
| URL Pattern | Description |
|---|---|
| /avatar/{name} | SVG avatar with auto-generated initials |
| /avatar/{name}.{fmt} | Specific format: .svg, .png, .jpg, .webp |
Query Parameters
| Parameter | Description | Example |
|---|---|---|
| bg | Background hex color | ?bg=3b82f6 |
| gradient | Gradient direction: to-t, to-tr, to-r, to-br, to-b, to-bl, to-l, to-tl, or radial | ?gradient=to-r |
| from | Gradient start hex color (requires gradient) | ?from=3b82f6 |
| via | Gradient midpoint hex color (optional) | ?via=8b5cf6 |
| to | Gradient end hex color (requires gradient) | ?to=ec4899 |
| text-color | Text hex color | ?text-color=ffffff |
| text | Custom text overlay | ?text=Hello |
| text-size | Font size in pixels | ?text-size=32 |
| text-align | Text alignment: left, center, right | ?text-align=left |
| text-transform | Transform: uppercase, lowercase, capitalize | ?text-transform=uppercase |
| text-decoration | Decoration: underline, overline, line-through | ?text-decoration=underline |
| letter-spacing | Spacing: tighter, tight, wide, wider, widest, or px | ?letter-spacing=wide |
| font-weight | Font weight (Tailwind values) | ?font-weight=bold |
| opacity | Opacity 0–100 | ?opacity=50 |
| blur | Gaussian blur in px (0–100) | ?blur=4 |
| brightness | Brightness 0–200 (100 = normal) | ?brightness=120 |
| contrast | Contrast 0–200 (100 = normal) | ?contrast=150 |
| hue-rotate | Hue rotation 0–360 degrees | ?hue-rotate=90 |
| invert | Invert colors | ?invert |
| saturate | Saturation 0–200 (100 = normal) | ?saturate=150 |
| sepia | Sepia tone filter | ?sepia |
| grayscale | Grayscale filter | ?grayscale |
| border | Border width in px | ?border=4 |
| border-color | Border hex color | ?border-color=000000 |
| border-style | Style: solid, dashed, dotted, double, none | ?border-style=dashed |
| rounded | Border radius: sm, md, lg, xl, 2xl, 3xl, full, or px | ?rounded=lg |
| format | Output format (default svg for placeholders, png for /snippet) | ?format=png |
| width | Snippet width (default 1200) | ?width=1200 |
| height | Snippet height (default 630) | ?height=630 |
| title | Snippet headline | ?title=Hello |
| subtitle | Snippet subheading | ?subtitle=World |
| cta | Snippet call to action | ?cta=Read+more |
| logo | HTTPS URL to a raster logo image | ?logo=https%3A%2F%2F… |
| size | Avatar dimensions (square) | ?size=256 |
Integration
See the full documentation for framework-specific guides (React, Next.js, Vue, Nuxt, Svelte, Laravel).
HTML
<img src="https://freeplaceholder.com/600x400.png" alt="Placeholder" width="600" height="400">
<img src="https://freeplaceholder.com/avatar/John+Doe.png" alt="John Doe" width="128" height="128">Markdown

CSS
.hero {
background-image: url('https://freeplaceholder.com/1920x1080.svg');
}Caching
All image responses include aggressive cache headers. Identical URLs always produce identical images, making long-term caching safe. Responses are served through CloudFront CDN for fast global delivery.
Cache-Control: public, max-age=31536000, s-maxage=31536000, immutableColor Hashing
When no custom colors are provided, the API uses a deterministic hash of the request path to generate a unique color pair. The same URL always produces the same colors. Foreground colors are automatically chosen for WCAG AA contrast compliance.
