phldr

Super light & free Placeholder Service

API Documentation

A quick guide to using phldr — with one-click copy examples.

Quickstart

Default (SVG)
Open
PNG
Open
JPG
Open
HEX (bg/fg)
Open
CSS color names
Open
Transparent background
Open
Alpha formats: PNG / WebP / AVIF / GIF.
Text: Hello World
Open
Space = +
Text: multi-line
Open
New line = \n
Font (Lato)
Open
Retina @2x (PNG)
Open
@2x/@3x for: PNG, JPEG, GIF, WebP, AVIF

📐 Size

Syntax: width x height. Omit height for a square. Min: 10×10, Max: 4000×4000.

600 × 400
Open
Square 400 × 400
Open

🧩 Format

Put the format at the end (/png or .png). Default: SVG.
Supported: SVG, PNG, JPEG, GIF, WebP, AVIF.

Trailing /png
Open
.png in size
Open
With colors + format
Open

🎨 Colour

Use HEX (3–8 chars) or CSS names. The transparent keyword makes a transparent background. When specifying colors, pass both bg/fg.

HEX: bg/fg
Open
CSS color names
Open
Transparent bg
Open

📝 Text

Use query ?text=.... Space +, new line \\n. Default text is the image size (e.g. 600 × 400).

Hello World
Open
Multi-line
Open

🔤 Fonts

?font=FontName. Default: Lato.
For bitmap outputs (PNG/JPEG/WebP/AVIF/GIF), prefer TTF/OTF/TTC files in /storage/fonts.
List fonts: https://phldr.com/api/fonts.

Use Lato
Open

🔷 Retina

Append @2x or @3x after the size.
Applies to: PNG, JPEG, GIF, WebP, AVIF (SVG ignores DPR).

600×400 @2x (PNG)
Open
800×800 @3x (WebP)
Open

⚙️ Advanced

Pad + Align + Style
Open
Border
Open
Rounded
Open
Pattern
Open
Watermark
Open
Transparent + PNG
Open
* Trailing slash supported: /600x400 and /600x400/ are equivalent.
* “Heavy” params (DPR, transparent, images > 4Mpx…) may require a signed URL.
* Optional “Error image” can return a tiny PNG with status codes (400/401/404/413/429/500).

Think simple, be unique. ✨

Made with by Tony Nguyen