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.4.0(2w ago)422.0kMITPHPPHP &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 1w ago

READMEChangelogDependencies (25)Versions (20)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

52

—

FairBetter than 96% of packages

Maintenance97

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

Recently: every ~12 days

Total

15

Last Release

15d 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

[mcp/sdk

Model Context Protocol SDK for Client and Server applications in PHP

1.6k2.2M141](/packages/mcp-sdk)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103574.3k68](/packages/friendsoftypo3-content-blocks)[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.2M65](/packages/rinvex-countries)[tomloprod/radiance

A deterministic mesh gradient avatar generator for PHP.

14212.6k](/packages/tomloprod-radiance)[cpsit/project-builder

Composer package to create new projects from project templates

2640.2k5](/packages/cpsit-project-builder)[magebitcom/magento2-mcp-module

Magento 2 MCP (Model Context Protocol) server module

171.1k12](/packages/magebitcom-magento2-mcp-module)

PHPackages © 2026

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