A Go port of Robohash — turn any string into a unique, deterministic robot avatar.
Installation • Usage • Examples • Attribution
- 🎨 5 Different Sets: Robots, monsters, cats, and human avatars
- 🎭 10 Color Schemes: For Set 1 robots
- 📦 Multiple Formats: PNG, JPG, GIF, WebP, and Data URI
- 🎯 Deterministic: Same input always produces the same avatar
- ⚡ Fast: Built with Go for maximum performance
- 🖼️ Custom Backgrounds: Optional background layers
# Clone the repository
git clone https://github.com/fl4vis/robohash.git
cd robohash
# Build and extract
make all
cd build
tar -xvzf robohash.tar.gzDownload the latest release from GitHub Releases
./robohash -input "hello@example.com"./robohash -input "user@example.com" -set 1 -color blue -bgset 1 -sizex 500 -sizey 500 -extension webp| Flag | Default | Description |
|---|---|---|
-set |
any |
Avatar style: • 1 - Robots (original)• 2 - Monsters• 3 - Robots (alt)• 4 - Cats• 5 - Humans• any - Random |
-color |
- | Set 1 only:blue, brown, green, grey, orange, pink, purple, red, white, yellow |
-bgset |
- | Background: • 1 - Background set 1• 2 - Background set 2• any - Random |
| Flag | Default | Description |
|---|---|---|
-extension |
png |
Format: png, jpg, jpeg, gif, webp, ppm, datauri |
-sizex |
300 |
Width in pixels |
-sizey |
300 |
Height in pixels |
| Flag | Default | Description |
|---|---|---|
-input |
required | String to hash into avatar |
-ignoreExt |
true |
Ignore file extensions when hashing |
-slots |
11 |
Hash slot divisions |
RoboHash generates avatars deterministically:
- Your input string is hashed using SHA-256
- The hash is split into segments (slots)
- Each slot determines a specific image layer
- Layers are composited together to create the final avatar
Same input = Same avatar, always! Perfect for user avatars, identicons, or fun profile pictures.
This project uses artwork from Robohash.org:
- Set 1: Robots by Zikri Kader
- Set 2: Monsters by Hrvoje Novakovic
- Set 3: Robots by Julian Peter Arias
- Set 4: Cats by David Revoy
- Set 5: Humans by Pablo Stanley
All images are licensed under CC-BY 4.0
This project is licensed under the MIT License


