DiceBear | Open Source Avatar Library & API (original) (raw)
Pick a seed.Get an avatar.
DiceBear is a privacy-focused, open source avatar library with 35+ avatar styles crafted by talented artists. Generate deterministic profile pictures via API, JS library, PHP library, Python library, Rust library, Go library, Dart library & CLI.
https://api.dicebear.com/10.x/lorelei/svg?seed=Feliximport { Style, Avatar } from '@dicebear/core';
import definition from '@dicebear/styles/lorelei.json' with { type: 'json' };
const style = new Style(definition);
const avatar = new Avatar(style, {
seed: 'Felix'
});<?php
use Composer\InstalledVersions;
use DiceBear\Style;
use DiceBear\Avatar;
$basePath = InstalledVersions::getInstallPath('dicebear/styles'); <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>s</mi><mi>t</mi><mi>y</mi><mi>l</mi><mi>e</mi><mo>=</mo><mi>S</mi><mi>t</mi><mi>y</mi><mi>l</mi><mi>e</mi><mo>:</mo><mo>:</mo><mi>f</mi><mi>r</mi><mi>o</mi><mi>m</mi><mi>J</mi><mi>s</mi><mi>o</mi><mi>n</mi><mo stretchy="false">(</mo><mi>f</mi><mi>i</mi><mi>l</mi><msub><mi>e</mi><mi>g</mi></msub><mi>e</mi><msub><mi>t</mi><mi>c</mi></msub><mi>o</mi><mi>n</mi><mi>t</mi><mi>e</mi><mi>n</mi><mi>t</mi><mi>s</mi><mo stretchy="false">(</mo></mrow><annotation encoding="application/x-tex">style = Style::fromJson(file_get_contents(</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em;"></span><span class="mord mathnormal">s</span><span class="mord mathnormal">t</span><span class="mord mathnormal" style="margin-right:0.03588em;">y</span><span class="mord mathnormal" style="margin-right:0.01968em;">l</span><span class="mord mathnormal">e</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em;"></span><span class="mord mathnormal">St</span><span class="mord mathnormal" style="margin-right:0.03588em;">y</span><span class="mord mathnormal" style="margin-right:0.01968em;">l</span><span class="mord mathnormal">e</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">::</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1.0361em;vertical-align:-0.2861em;"></span><span class="mord mathnormal" style="margin-right:0.10764em;">f</span><span class="mord mathnormal">ro</span><span class="mord mathnormal">m</span><span class="mord mathnormal" style="margin-right:0.09618em;">J</span><span class="mord mathnormal">so</span><span class="mord mathnormal">n</span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.10764em;">f</span><span class="mord mathnormal">i</span><span class="mord mathnormal" style="margin-right:0.01968em;">l</span><span class="mord"><span class="mord mathnormal">e</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.03588em;">g</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.2861em;"><span></span></span></span></span></span></span><span class="mord mathnormal">e</span><span class="mord"><span class="mord mathnormal">t</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">c</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mord mathnormal">o</span><span class="mord mathnormal">n</span><span class="mord mathnormal">t</span><span class="mord mathnormal">e</span><span class="mord mathnormal">n</span><span class="mord mathnormal">t</span><span class="mord mathnormal">s</span><span class="mopen">(</span></span></span></span>basePath . '/src/lorelei.json'));
<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>a</mi><mi>v</mi><mi>a</mi><mi>t</mi><mi>a</mi><mi>r</mi><mo>=</mo><mi>n</mi><mi>e</mi><mi>w</mi><mi>A</mi><mi>v</mi><mi>a</mi><mi>t</mi><mi>a</mi><mi>r</mi><mo stretchy="false">(</mo></mrow><annotation encoding="application/x-tex">avatar = new Avatar(</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6151em;"></span><span class="mord mathnormal">a</span><span class="mord mathnormal" style="margin-right:0.03588em;">v</span><span class="mord mathnormal">a</span><span class="mord mathnormal">t</span><span class="mord mathnormal">a</span><span class="mord mathnormal" style="margin-right:0.02778em;">r</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal">n</span><span class="mord mathnormal">e</span><span class="mord mathnormal" style="margin-right:0.02691em;">w</span><span class="mord mathnormal">A</span><span class="mord mathnormal" style="margin-right:0.03588em;">v</span><span class="mord mathnormal">a</span><span class="mord mathnormal">t</span><span class="mord mathnormal">a</span><span class="mord mathnormal" style="margin-right:0.02778em;">r</span><span class="mopen">(</span></span></span></span>style, [
'seed' => 'Felix'
]);from importlib.resources import files
from dicebear import Avatar, Style
style = Style.from_json(
files("dicebear_styles").joinpath("lorelei.json").read_text("utf-8")
)
avatar = Avatar(style, {
"seed": "Felix"
})use dicebear_core::{Avatar, Style};
use serde_json::json;
let style = Style::from_str(dicebear_styles::LORELEI)?;
let avatar = Avatar::new(&style, json!({
"seed": "Felix"
}))?;import (
dicebear "github.com/dicebear/dicebear-go/v10"
"github.com/dicebear/styles/v10"
)
style, _ := dicebear.NewStyle([]byte(styles.Lorelei))
avatar, _ := dicebear.NewAvatar(style, map[string]any{
"seed": "Felix",
})import 'package:dicebear_core/dicebear_core.dart';
import 'package:dicebear_styles/lorelei.dart';
final style = Style.parse(lorelei);
final avatar = Avatar(style, {
'seed': 'Felix',
});npx dicebear lorelei --seed 'Felix'
Lorelei is a remix of Lorelei by Lisa Wischofsky, licensed under CC0 1.0.
User Profiles
Give every user a unique avatar from day one. No upload, no Gravatar fallback, no awkward grey silhouette.
Hey 👋
How's the launch?
Going great!
Chat Applications
Instantly recognisable participants. Deterministic from a user ID, so the same person looks the same on every device.
Gaming
Generate millions of unique player identities, NPCs and bots. The same seed gives the same character every session.
posyAnyone tried the new beta?
renYep, runs 2× faster.
ivoSubmitted a PR for the bug.
Forums & Communities
Distinct identities help build community trust. New users feel welcome with a face from the very first post.
Lex Hart_Design_
Mae Park_Engineering_
Sam Ito_Product_
Avery Lin_Marketing_
Team Tools
Visual distinction for team members in collaborative apps. In cursors, mentions, and sidebars, every face stays consistent.
Placeholder Images
Beautiful default profile pictures while users set up their account, and a graceful fallback when uploads fail.
Avatar Maker Without Code
No developer? No problem! Our avatar maker lets anyone create custom profile pictures without writing a single line of code. Just pick, click, and download.
No Coding Required
Click to customize hair, eyes, accessories, and more.
Endless Combinations
Mix and match colors and styles to create your unique look.
Download as PNG
Save your avatar and use it anywhere you like.
1
Design in Figma
Create your avatar components visually. Group colors and parts using our simple naming conventions.
2
Export with Plugin
Use the DiceBear Figma plugin to configure options and export your style as a ready-to-use package.
3
Build & Use
Run npm install and npm run build. Your custom style is ready to generate avatars.
Free and Open Source.
Forever.
DiceBear is built in the open. Our core library is MIT licensed, and we believe in transparent development. Join thousands of developers who already love DiceBear.