PHPackages                             dicebear/core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dicebear/core

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dicebear/core
=============

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

v10.0.1(1mo ago)3737MITPHPPHP &gt;=8.2CI failing

Since May 17Pushed 2w agoCompare

[ Source](https://github.com/dicebear/dicebear-php)[ Packagist](https://packagist.org/packages/dicebear/core)[ RSS](/packages/dicebear-core/feed)WikiDiscussions 10.x Synced 4w ago

READMEChangelogDependencies (15)Versions (9)Used By (0)

[![](https://camo.githubusercontent.com/9303dc1e74c74820c7b70f1c9ec62354d2d5f05b6501c5c0083342079e69cd77/68747470733a2f2f7777772e64696365626561722e636f6d2f6c6f676f2d726561646d652e737667)](https://camo.githubusercontent.com/9303dc1e74c74820c7b70f1c9ec62354d2d5f05b6501c5c0083342079e69cd77/68747470733a2f2f7777772e64696365626561722e636f6d2f6c6f676f2d726561646d652e737667) DiceBear Core (PHP)
=====================================================================================================================================================================================================================================================================================================================================================================================================

[](#-dicebear-core-php)

PHP 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/php-library/)

Installation
------------

[](#installation)

```
composer require dicebear/core
```

Requires PHP 8.2+ and the `mbstring` extension.

Usage
-----

[](#usage)

```
use DiceBear\Avatar;

// From a style definition (JSON-decoded array)
$definition = json_decode(file_get_contents('path/to/style.json'), true);

$avatar = new Avatar($definition, [
    'seed' => 'John Doe',
    'size' => 128,
]);

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

### Using the Style class

[](#using-the-style-class)

```
use DiceBear\Style;
use DiceBear\Avatar;

$style = new Style($definition);

// Create multiple avatars from the same style
$avatar1 = new Avatar($style, ['seed' => 'Alice']);
$avatar2 = new Avatar($style, ['seed' => 'Bob']);
```

Sponsors
--------

[](#sponsors)

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

[    ![bunny.net](https://camo.githubusercontent.com/4ae34db3dad914c12edc4dc985f9c62d3d4cde77d4d6de3471bd9211c42ac5c2/68747470733a2f2f7777772e64696365626561722e636f6d2f73706f6e736f72732f62756e6e792d6461726b2e737667) ](https://bunny.net/)

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance95

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

4

Last Release

30d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/647303?v=4)[Florian Körner](/maintainers/FlorianKoerner)[@FlorianKoerner](https://github.com/FlorianKoerner)

---

Top Contributors

[![FlorianKoerner](https://avatars.githubusercontent.com/u/647303?v=4)](https://github.com/FlorianKoerner "FlorianKoerner (1 commits)")

---

Tags

svgavatarDiceBear

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dicebear-core/health.svg)

```
[![Health](https://phpackages.com/badges/dicebear-core/health.svg)](https://phpackages.com/packages/dicebear-core)
```

###  Alternatives

[fortawesome/font-awesome

The iconic font, CSS, and SVG framework

76.7k7.6M142](/packages/fortawesome-font-awesome)[components/flag-icon-css

A curated collection of all country flags in SVG — plus the CSS for easier integration.

12.2k1.7M23](/packages/components-flag-icon-css)[twbs/bootstrap-icons

Official open source SVG icon library for Bootstrap

8.0k2.2M77](/packages/twbs-bootstrap-icons)[mcp/sdk

Model Context Protocol SDK for Client and Server applications in PHP

1.5k1.5M79](/packages/mcp-sdk)[rinvex/countries

Rinvex Countries is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips.

1.7k8.0M59](/packages/rinvex-countries)[laravolt/avatar

Turn name, email, and any other string into initial-based avatar or gravatar.

2.0k5.8M38](/packages/laravolt-avatar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
