Default Avatar for User Profiles: Initials, Icons or Art

How to pick a default avatar for user profiles: initials vs a silhouette icon vs generated art, the sizes to export, and free libraries with licenses checked.

Amit Yadav
13 min read
On this page

The best default avatar for a user profile is the user's initials on a color picked from their user id, with generated illustrated art as the second choice when you have no name. Use a neutral silhouette icon only when you know nothing about the user, and never give a real user a realistic face they did not upload.

Most people never upload a profile photo, so the default is what most of your users see in comments, chats, member lists and the account menu. This guide covers which kind of default to pick, how to make it stable per user, which sizes to ship, and which free libraries can generate it, with licenses we checked on 30 November 2026.

Key takeaways

  • Initials first: two letters on a color derived from the user id. Cheap, readable, and it tells users apart.
  • Generated art second: DiceBear, Boring Avatars or Minidenticons make a unique SVG from a seed when there is no name.
  • Silhouette last: a grey person icon says nothing about who the user is, so lists of them look like one person.
  • No realistic faces for real users: a photo or AI face that is not theirs makes people think it is them.
  • Generate once, store it: create the default at signup and save it, so it never changes when a library updates.

The four kinds of default avatar

Almost every product uses one of four defaults. They differ in how well they tell users apart, what they need from you, and what can go wrong.

DefaultTells users apartNeedsRisk
Initials on a colorYes, by letters and colorA display nameOdd names, emoji, non-Latin scripts
Generated art (shapes, characters)Yes, by patternAny stable stringStyle may clash with your brand
Silhouette iconNoNothingEvery user looks the same
Realistic face (photo or AI)YesA face libraryUsers take it as the person's real face

Design systems agree on the order. Shopify's avatar component falls back to initials when there is no image, and SAP's default is a gender-neutral person symbol for when nothing else is known. Visa's guidance adds one more point: pick one default style for the whole app, and let users change it later.

Initials: the default most apps should ship

Initials work because they carry real information. In a thread with ten people, "AS" in teal and "MK" in orange are easy to tell apart at a glance, and they match the name next to them.

Rules that keep initials readable:

  • Two letters at 32 px and up, one letter below. Two letters in a 24 px circle get too small to read.
  • Take the color from the user id, not the name. If the color comes from the name, it changes when the user edits their name. Hash the id into a fixed palette of 6 to 10 colors.
  • Check contrast on every palette color. Initials are text, so aim for at least 4.5:1 between the letters and the background (WCAG AA for normal text). Pale pastels with white letters usually fail.
  • Handle names that break the rule. One-word names, emoji, names in Chinese or Arabic script, and names that start with a symbol all need a fallback. Take the first grapheme of the first word, and use generated art when you get nothing usable.
const PALETTE = ['#0f766e', '#b45309', '#4338ca', '#be123c', '#15803d', '#7c3aed'];

function hash(str) {
  let h = 0;
  for (const ch of str) h = (h * 31 + ch.codePointAt(0)) >>> 0;
  return h;
}

export function initialsAvatar(user) {
  const words = (user.name ?? '').trim().split(/\s+/).filter(Boolean);
  const first = (w) => (w ? [...w][0] : '');
  const letters = (first(words[0]) + first(words.length > 1 ? words.at(-1) : '')).toUpperCase();
  return { letters, color: PALETTE[hash(user.id) % PALETTE.length] };
}

The six colors above all keep white text above 4.5:1. Swap them for your brand colors, then check each one again.

Generated art: when there is no name

Many sign-ups give you only an email address, a wallet address or an anonymous id. Generated avatars turn any string into a unique image, and the same string always gives the same image. That is called a deterministic avatar, and it is what you want: the avatar stays the same on every device and every reload.

Three free libraries cover most needs. We compare more of them, with live previews, on our avatar generator libraries page.

LibraryOutputStylesLicense (checked 30 Nov 2026)
DiceBearSVG, HTTP API or npm63 styles, from initials and shapes to drawn charactersCode MIT; each style has its own license
Boring AvatarsSVG, React component6 variants: marble, beam, pixel, sunset, ring, bauhausMIT (npm 2.0.4)
MinidenticonsSVG, tiny function or custom elementPixel identicons, adjustable saturation and lightnessMIT (npm 4.2.1)

The DiceBear license trap. DiceBear's code is MIT, but its licenses page lists every style separately: 44 styles are CC0, 14 are CC BY 4.0, 1 is MIT and 4 use the artist's own terms. Initials, Shapes, Thumbs, Rings, Identicon, Lorelei and Notionists are CC0, so you can use them with no credit. Adventurer, Micah, Personas, Big Smile and Fun Emoji are CC BY 4.0, which means you must credit the artist somewhere a user can find it, such as your About or credits page. Check the style before you ship it, not after.

DiceBear released @dicebear/core 11.0.0 on 29 November 2026, while @dicebear/collection is still at 9.4.2. Until the docs for the new version settle, pin version 9 for the npm route:

// npm i @dicebear/core@9 @dicebear/collection@9
import { createAvatar } from '@dicebear/core';
import { shapes } from '@dicebear/collection';

const svg = createAvatar(shapes, { seed: user.id }).toString();

The HTTP API (https://api.dicebear.com/9.x/shapes/svg?seed=...) is handy for a prototype, but for production generate the SVG yourself. A user list that depends on a third-party image host breaks when that host is slow or changes its URL scheme.

Gravatar as a default source. If you already use Gravatar, its d= parameter has built-in defaults: initials and color (both marked beta), mp (a silhouette), identicon, monsterid, wavatar, retro, robohash, blank, and 404 to get no image so you can draw your own. A custom default URL must be public, end in an image extension (jpg, jpeg, gif, png or heic) and have no query string, so you cannot pass a DiceBear SVG URL as the default. Use d=404 and fall back in your own code instead.

A silhouette icon: only as the last step

A grey person outline is the oldest default, and it is the weakest. Ten identical silhouettes in a member list say nothing about who is who. It also carries old bias: for years the default "person" on many platforms looked male.

Keep a silhouette for two cases: a signed-out state, and the brief moment before a user record loads. Make it a neutral shape, not a gendered one, and use a single SVG that inherits currentColor so it works in dark mode. Our accessible SVG icons guide shows how to mark a decorative icon so screen readers skip it.

Realistic faces: for demos, never for real users

It is tempting to give every new user a friendly human face from a photo or AI portrait set. Do not. A face next to a real user's name tells everyone "this is what this person looks like". It is not, and it can mislead people about who they are talking to.

Realistic faces belong in places where nobody is a real user:

  • Seed data and demo accounts, so a sales demo or a staging site looks lived in.
  • Screenshots for app stores, docs and landing pages.
  • An onboarding preview that shows "this is how your profile will look" before the user adds their own photo, clearly as an example.

This is where our own set fits. Personified is made by the All SVG Icons team. Personified is 315 AI-generated portraits of fictional people from 153 countries, each with a name, age band, region, skin tone and mood, as square WebP at 128, 256 and 512 px. The npm package personified (1.0.0) has a pick(userId) function that returns the same face for the same key, which keeps demo screenshots stable. The Free Asset License allows commercial use with no credit, and it forbids presenting the faces as real people, including fake profiles. So Personified fits your seed data and screenshots, and it is not a default avatar for real accounts.

The limits: 315 faces is a small pool, 123 of the 153 countries have only one or two faces, and the images are raster WebP, not SVG. If you need placeholder faces for mockups and want to compare sources, our guide to placeholder profile pictures for mockups covers the other options.

A brand set of illustrated defaults

A middle path between initials and generated art: draw a small set of 6 to 12 illustrated defaults in your brand style, and assign one per user with the same id hash as above.

const DEFAULTS = 8;
const src = `/img/avatars/default-${hash(user.id) % DEFAULTS}.svg`;

This gives you full control of style and license, and it still tells users apart in a short list. With 8 images, two users in a list of 10 will often share one, so pair the art with the name or initials.

You can design such a set in our 3D avatar builder: build a geometric character, change the palette and face for each variant, and export each as SVG or as PNG at 256 or 512 px. Everything runs in your browser and nothing is uploaded. The builder makes one avatar at a time, so a set of 8 is 8 exports, and the style is geometric 3D, not flat or hand-drawn.

Sizes to export

Avatars appear at many sizes in one product. Common placements, in CSS pixels:

WhereCSS sizeShip at least
Inline mention, reaction list20 to 24 px64 px raster, or SVG
Comment, chat bubble, table row32 to 40 px128 px
Account menu, member list40 to 48 px128 px
Card, contact detail64 to 96 px256 px
Profile page header128 to 160 px512 px

Raster images need about 2 times the CSS size for sharp results on high-density screens, and 3 times on some phones. SVG defaults (initials, DiceBear, Boring Avatars) need no size set at all, which is one more reason to keep defaults as vectors. If a platform needs a PNG, such as an email client or an Open Graph image, our SVG to PNG converter exports at any size.

Store square images and crop in CSS (border-radius: 50% for circles), so you can change the shape later without new files.

Generate once, store it

You can make the default when the page renders, or once when the user signs up. Store it at signup:

  • It never changes by accident. A library update can change how a seed renders. A stored file does not.
  • Every surface shows the same thing. Web, mobile, email and push notifications all read one URL.
  • No runtime dependency. Your user list does not wait on a generator or an outside host.

Initials are the exception: render them live from the name, since they must follow name changes. Store only the color index.

The render order then looks like this: the uploaded photo if there is one; else the stored default; else initials; else the silhouette. Also handle a broken photo URL. If the image fails to load, swap to the default so the user does not see a broken image icon.

<img src="/u/42/photo.jpg" alt="" width="40" height="40"
     onerror="this.onerror=null;this.src='/u/42/default.svg'">

Accessibility

  • Alt text: when the user's name is shown next to the avatar, use alt="", since the name is already there. When the avatar stands alone (an account menu button), the alt or the button's label should be the name, such as "Ana Silva, account menu".
  • Do not rely on color alone. Two users with the same initials and similar colors look identical. Keep the name visible in lists.
  • Focus and tap size: an avatar that opens a menu is a button. Give it a visible focus ring and at least a 24 by 24 px target (WCAG 2.2 minimum), and larger on touch screens.

FAQ

What is the best default avatar for a user profile?
Initials on a color taken from the user id. They are readable, cheap to render, and they tell users apart. Use generated art such as DiceBear Shapes or Boring Avatars when you have no name, and a neutral silhouette only as the last fallback.
Should I use a stock photo or AI face as the default avatar?
No. A realistic face next to a real user's name makes people think it is that person. Keep photo and AI faces for demo data, screenshots and onboarding previews, and use initials or illustrated art for real accounts.
How do I give each user the same default avatar every time?
Derive it from a value that never changes, such as the user id. Hash the id to pick a color or an image from a set, or pass it as the seed to a generator like DiceBear. Store the result at signup so library updates cannot change it.
What size should a default avatar be?
Use SVG when you can, since it is sharp at every size. For raster images, ship 128 px for lists and comments, 256 px for cards, and 512 px for profile headers, which covers high-density screens.
Are DiceBear avatars free for commercial use?
The code is MIT, but each style has its own license. As checked on 30 November 2026, 44 styles are CC0 and need no credit, while 14 styles, including Adventurer and Micah, are CC BY 4.0 and need a credit to the artist.
Can Gravatar generate a default avatar?
Yes. Its d= parameter supports initials, color, mp, identicon, monsterid, wavatar, retro, robohash and blank. Use d=404 if you want to draw your own fallback, since a custom default URL cannot carry a query string.

Related posts

Share this post