Zero-dependency, infinite-resolution vector avatars generated deterministically from any username, email, or user ID. Features 12 curated modern gradients, intelligent initials parsing, dynamic squircle or circle clipping, and 1-year immutable CDN caching.
Customize seed, dimensions, and shape to preview the dynamically generated vector SVG in real-time.
Seed: "Bret"
Shape: Circular (rx=size/2)
The backend hashes the seed string into an integer to select from 12 accessible, modern linear gradients. Click any palette to load its matching seed into the studio.
How Playground API safely extracts clean initials while eliminating vector injection and XSS vulnerabilities.
| Input Seed | Extracted Initials | Parsing Logic |
|---|---|---|
| Leanne Graham | LG | First char of first & second word |
| user-alex-turner | UA | Hyphen/underscore separated tokens |
| bret | BR | First two letters of single word |
| Z | Z | Single letter fallback |
| *** | PA | Playground Avatar default fallback |
Every rendered initial character undergoes strict XML entity escaping via escapeXml() to eliminate SVG tag breakout and stored XSS vectors.
In-memory LRU cache stores up to 1,000 recently generated SVGs on the server, serving repeated requests in under 1 millisecond.
Execute direct HTTP requests to test responses and raw SVG XML payloads:
Ready-to-use snippets for React components, Tailwind avatar stacks, TypeScript helpers, and direct HTML: