Beautiful Text Avatars

Generate stunning avatars with initials from any name. Free, fast, privacy-friendly, and infinitely scalable.

SC AM JW ED MB

Playground

Customize your avatar and copy the URL

Preview
/api?name=John+Doe&background=6366f1&color=ffffff&size=128&rounded=true&bold=true

Why TextAvatars?

Everything you need for user avatars, nothing you don't

Blazing Fast

Served from 300+ edge locations worldwide. Average response time under 50ms.

🔒

Privacy First

No tracking, no cookies, no data storage. We never see or store your users' names.

Unlimited & Free

No API keys, no rate limits, no signup required. Just use it.

🎨

Fully Customizable

Colors, sizes, fonts, shapes. Make avatars that match your brand perfectly.

🚀

SVG Output

Crisp at any resolution. Tiny file sizes. Perfect for retina displays.

🌍

Works Everywhere

Simple URL-based API. Works in any language, framework, or platform.

API Reference

Simple REST API with sensible defaults

GET https://textavatars.com/api
Parameter Default Description
name John Doe The name to generate initials from
size 64 Image size in pixels (16-512)
background f0e9e9 Background color (hex without #) or random
color auto Text color (hex). Auto-contrasts if not set
length 2 Number of initials to display
font-size 0.5 Font size as ratio of image (0.1-1.0)
rounded false Circular avatar (true/false)
bold false Bold text (true/false)
uppercase true Uppercase initials (true/false)
format svg Output format (svg, png, jpg)

Gravatar Fallback

Use as a default avatar when Gravatar has no image

GET /api/:name/:size/:background/:color/:length/:font-size/:rounded/:uppercase/:bold

Due to Gravatar limitations, parameters must be passed as path segments instead of query parameters.

Example Gravatar URL:

https://www.gravatar.com/avatar/EMAIL_MD5?d=https%3A%2F%2Ftextavatars.com%2Fapi%2FJohn%2520Doe%2F128%2F6366f1%2Ffff

Parameter order: name / size / background / color / length / font-size / rounded / uppercase / bold

Quick Start

Copy and paste into your project

<!-- Basic usage -->
<img src="https://textavatars.com/api?name=John+Doe" alt="JD">

<!-- With custom colors -->
<img src="https://textavatars.com/api?name=Sarah+Chen&background=6366f1&color=fff" alt="SC">

<!-- Rounded with bold text -->
<img
  src="https://textavatars.com/api?name=Alex+Morgan&background=ec4899&color=fff&rounded=true&bold=true&size=64"
  width="64"
  height="64"
  alt="Alex Morgan"
>