via.placeholder.com/avatar

Avatar placeholders

Give it a name, get initials on a colour that is always the same for that name. Or ask for abstract shapes, an identicon or a neutral silhouette. Never a human face.

URL syntax

https://via.placeholder.com/avatar/<name>[@2x][.<format>][?size=&shape=&style=&bg=&fg=&seed=&dpr=]

Every part is optional, and an avatar URL never returns an error: anything it can't make sense of becomes a sensible default.

PartValuesDefault
nameURL-encoded full name: Anna%20Svensson → AS. +, _, and hyphenated or dotted slugs (anna-svensson, anna.svensson) also separate words. An e-mail address uses its local part. Also ?name=. Unicode-aware; CJK names get one character.silhouette
format.png, .svg, .webp, .jpg, .gif, .avif (or ?format=). AVIF keeps the transparent corners. Other image extensions get a PNG.png
size16 to 512 px, clamped. Also ?s=, or a path segment: /avatar/128/Anna%20Svensson.128
scale@1x to @3x (also @1.5x) at the end of any segment, or ?dpr=1 to 3. See Retina.1
shapecircle, square, rounded. JPEG and GIF have no transparency, so the corners are white there.circle
styleinitials, shapes, identicon, silhouette. Also as a path segment: /avatar/identicon/<seed>.initials for names
bg, fg3 or 6 digit hex (with or without #, URL-encoded as %23) or a CSS colour name. Without fg, initials are white or near-black, whichever contrasts better.from the seed
seedAny string. Picks the colours and pattern. Use a stable ID so two people with the same name look different.the name as written in the URL

Examples

Retina: @2x and @3x

A scale multiplies the pixel size and keeps the drawing identical, just sharper:

<img src="https://via.placeholder.com/avatar/Anna%20Svensson.png?size=48"
     srcset="https://via.placeholder.com/avatar/Anna%20Svensson.png?size=48&amp;dpr=2 2x"
     width="48" height="48" alt="Anna Svensson">

URLs that look like guesses

AI tools and old templates often write avatar URLs that describe a person instead of naming one. Those get something neutral, never a face:

With synthetic people

Every persona and mock API user comes with a matching avatar URL, seeded by the persona ID:

"avatar_url": "https://via.placeholder.com/avatar/Magnus%20Magnusson.png?seed=se-1"

Determinism and headers