# DiceBear: open source avatar library & API ## What is DiceBear? DiceBear generates avatars for your project. The avatar styles cover a range of looks, from abstract shapes to designed characters, and the avatars can be used in many kinds of applications. In addition to purely random avatars, you can also create [deterministic](https://en.wikipedia.org/wiki/Deterministic_algorithm) avatars for user identities. With the built-in [PRNG](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) you create the same avatar over and over again based on a seed. Individual avatars are also possible: each avatar style provides many options to adjust the result. DiceBear is available through the [JavaScript library](https://www.dicebear.com/how-to-use/js-library/), [PHP library](https://www.dicebear.com/how-to-use/php-library/), [Python library](https://www.dicebear.com/how-to-use/python-library/), [Rust library](https://www.dicebear.com/how-to-use/rust-library/), [Go library](https://www.dicebear.com/how-to-use/go-library/), [Dart library](https://www.dicebear.com/how-to-use/dart-library/), [HTTP API](https://www.dicebear.com/how-to-use/http-api/), [CLI](https://www.dicebear.com/how-to-use/cli/), [Figma plugin](https://www.figma.com/community/plugin/1005765655729342787/DiceBear-Exporter), [Editor](https://editor.dicebear.com) and [Playground](https://www.dicebear.com/playground/), so you can integrate it into most projects. The [Avatar API](https://www.dicebear.com/how-to-use/http-api/) provides URL-based integration without installing anything. ## How to use? ## How does it work? The avatars are created in [SVG](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics) format. This allows to generate avatars dynamically without much computing power. In most cases, various SVG elements such as hair, eyes, ears etc. are selected from a set and combined to create a character / avatar. [FNV-1a](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function) combined with [Mulberry32](https://gist.github.com/tommyettinger/46a874533244883189143505d203312c) is used as the algorithm for the [PRNG](https://en.wikipedia.org/wiki/Pseudorandom_number_generator). The PRNG **does not** attempt to be [cryptographically secure](https://en.wikipedia.org/wiki/Cryptographically-secure_pseudorandom_number_generator). ## Privacy by design DiceBear is built with privacy in mind. When using the [JavaScript library](https://www.dicebear.com/how-to-use/js-library/), [PHP library](https://www.dicebear.com/how-to-use/php-library/), [Python library](https://www.dicebear.com/how-to-use/python-library/), [Rust library](https://www.dicebear.com/how-to-use/rust-library/), [Go library](https://www.dicebear.com/how-to-use/go-library/) or [Dart library](https://www.dicebear.com/how-to-use/dart-library/), avatars are generated entirely on your infrastructure. No personal data ever leaves your systems. For teams that require full control over data retention and infrastructure, DiceBear can be [self-hosted](https://www.dicebear.com/guides/host-the-http-api-yourself/), so there is no dependency on external services.