# @dicebear/core

> Unique avatars from dozens of styles — deterministic, customizable, vector-based.

Latest version **10.7.0** (published 2026-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @dicebear/core
pnpm add @dicebear/core
yarn add @dicebear/core
bun add @dicebear/core
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 10.7.0 |
| Published | 2026-08-26 |
| First published | 2021-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22.0.0 |
| Dependencies | 0 |
| Unpacked size | 450.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 9974 |
| Author | Florian Körner |
| Maintainers | floriankoerner |
| Keywords | avatar, identicon, avataaars, bottts, dicebear |

## Links

- npm: https://www.npmjs.com/package/@dicebear/core
- Repository: https://github.com/dicebear/dicebear
- Homepage: https://www.dicebear.com
- Issues: https://github.com/dicebear/dicebear/issues
- Funding: https://www.dicebear.com/support/
- npm.io page: https://npm.io/package/@dicebear/core

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 10.7.0 (latest) — 2026-08-26
- 11.0.0-rc.2 (next) — 2026-09-07
- 10.5.0 (v10-lts) — 2026-08-09
- 9.4.3 (v9-lts) — 2026-07-05
- 5.6.1 (v5-lts) — 2026-03-20
- 6.3.0 (v6-lts) — 2026-03-19
- 7.2.0 (v7-lts) — 2026-03-19
- 8.1.0 (v8-lts) — 2026-03-19
- 11.0.0-rc.1 — 2026-09-01
- 10.7.0-rc.1 — 2026-08-22
- 10.6.1 — 2026-08-18
- 10.6.0 — 2026-08-16
- 10.4.0 — 2026-08-01
- 10.4.0-rc.2 — 2026-07-31
- 10.4.0-rc.1 — 2026-07-31
- … 147 more at https://npm.io/package/@dicebear/core/versions

## README

<h1><img src="https://www.dicebear.com/logo-readme.svg" width="28" /> DiceBear Core (JavaScript)</h1>

[![stars](https://www.dicebear.com/badges/stars.svg)](https://github.com/dicebear/dicebear/stargazers)
[![license](https://www.dicebear.com/badges/license.svg)](https://github.com/dicebear/dicebear/blob/10.x/LICENSE)

JavaScript implementation of the DiceBear avatar library. Generates
deterministic SVG avatars from style definitions and a seed string.

DiceBear is available for multiple languages. All implementations share the same
PRNG and rendering pipeline, producing identical SVG output for the same seed,
style, and options, regardless of the language used.

[Playground](https://www.dicebear.com/playground) |
[Documentation](https://www.dicebear.com/how-to-use/js-library/)

## Installation

```sh
npm install @dicebear/core
```

Requires Node.js 22+ or any modern browser.

## Usage

```js
import { Avatar } from '@dicebear/core';

// From a style definition (here from the @dicebear/styles package)
import definition from '@dicebear/styles/lorelei.json' with { type: 'json' };

const avatar = new Avatar(definition, {
  seed: 'John Doe',
  size: 128,
});

avatar.toString(); // SVG string
avatar.toDataUri(); // data:image/svg+xml;charset=utf-8,...
```

### Using the Style class

```js
import { Style, Avatar } from '@dicebear/core';

const style = new Style(definition);

// Create multiple avatars from the same style
const avatar1 = new Avatar(style, { seed: 'Alice' });
const avatar2 = new Avatar(style, { seed: 'Bob' });
```

## Sponsors

Advertisement: Many thanks to our sponsors who provide us with free or
discounted products.

<a href="https://bunny.net/" target="_blank" rel="noopener noreferrer">
    <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://www.dicebear.com/sponsors/bunny-light.svg">
        <source media="(prefers-color-scheme: light)" srcset="https://www.dicebear.com/sponsors/bunny-dark.svg">
        <img alt="bunny.net" src="https://www.dicebear.com/sponsors/bunny-dark.svg" height="64">
    </picture>
</a>

---
_Source: https://npm.io/package/@dicebear/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
