21 Nov 2026 · Open source · 5 min read
One URL, 56,448 faces
How the Kuberdons turn any name into the same face every time, and how one small server can hand them out to anyone.

The Kuberdons are our default avatars: a small cone-shaped figure with a face, on a coloured background. Give them any string, a name or an id, and you get a Kuberdon. Give them the same string again and you get the same one, on every device. Kalendars uses them, and so does this site. They're also a public URL that anyone can put in an <img> tag:
https://cdn.kuberdon.eu/kuberdons/v1/{seed}.svg
https://cdn.kuberdon.eu/kuberdons/v1/{seed}.png
Where 56,448 comes from
A Kuberdon is six choices, each from a fixed list:
- 16 palettes, 8 with a dark background and a light body and 8 the other way round
- 4 poses: rise, peek, peek left and tilt
- 7 eyes and 7 mouths
- cheeks or no cheeks
- 8 extras, like a beanie, glasses or earbuds, or none
16 × 4 × 7 × 7 × 2 × 9 is 56,448. That's every face there is. Names are unlimited, so different names can and do land on the same face. For a default avatar next to a name, that's fine.
Same name, same face
The seed goes through two small, well-known functions. FNV-1a turns the string into a 32-bit number. That number seeds mulberry32, a tiny random number generator, and each call to it picks one trait:
export function hash(str: string): number {
let h = 0x811c9dc5
for (const ch of String(str)) {
h ^= ch.codePointAt(0) as number
h = Math.imul(h, 0x01000193) >>> 0
}
return h >>> 0
}
export function pick(seed: string): KuberdonTraits {
const r = rng(hash(seed))
const at = (list: readonly unknown[]) => Math.floor(r() * list.length)
const p = at(traits.palettes),
pose = at(traits.poses),
eyes = at(traits.eyes),
mouth = at(traits.mouths)
const cheeks = r() < 0.35 ? 1 : 0
const acc = r() < 0.45 ? 0 : 1 + Math.floor(r() * (traits.accessories.length - 1))
return { palette: p, pose, eyes, mouth, cheeks, accessory: acc }
}
Nothing in there depends on the platform. Math.imul and the >>> 0 keep every step in 32-bit integers, so the server, a browser and the React Native app all get the same numbers. Cheeks show up 35% of the time and an extra 55% of the time.
The order of the picks matters as much as the lists. Palette, pose, eyes, mouth, cheeks, extra: change that order, or add a palette in the middle of the list, and existing Kuberdons change face. So we froze it. This is v1, and v1 never changes. The package ships 200 sample avatars with the sha256 of each, and a test draws all 200 and compares them byte for byte. Any change to the output fails CI. If we ever want new faces, they go to v2 at a new URL.
The generator lives in our products repo. This site doesn't have its own copy: a script copies the package in byte for byte and writes down the source commit and a sha256 per file. A test fails when someone edits a vendored file by hand, and it draws the same 200 samples here too.
The drawing
createKuberdon(seed) returns an SVG string. Everything sits in a 100 by 100 box: a background gradient, the body, the face, the extra, and a mask for the shape (circle, squircle or square). The face is two dots and a short curve, more or less.
There's one size rule. Below 24 pixels the extras and cheeks are dropped, except glasses, so a tiny avatar in a list stays readable. Ask for the size you show. A 256 pixel SVG squeezed into 16 points keeps the extras and looks cluttered.
Serving it
The URL is served by a small Express app, on its own DigitalOcean app, separate from our API. A burst of renders costs CPU and memory, and we didn't want that to ever take the API down.
What keeps it cheap is that the answer to a URL never changes. So every response is cached for a year:
Cache-Control: public, max-age=31536000, immutable
DigitalOcean's edge sits in front of the app and keeps those answers, so what reaches the app is mostly cache misses. The app itself keeps up to 2,000 rendered answers in memory. SVGs are compressed once, with brotli and with gzip, when they're first drawn. PNGs come from the same SVG through sharp, with sharp's own cache off and one thread, because the instance has one vCPU. Each client IP gets 1,200 requests a minute.
The other half of caching is that one avatar should have one URL. Before anything is drawn, the request is normalised: parameters are sorted and defaults left out. ?size=128&shape=circle and no query at all are the same avatar, so they share one entry in the app's memory and one strong ETag. A client that already has it gets a 304.
params.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))
const search = params.map(([k, v]) => `${k}=${encodeURIComponent(v)}`).join('&')
const key = `/kuberdons/${KUBERDONS_VERSION}/${encodeURIComponent(seed)}.${format}${search ? `?${search}` : ''}`
The query can also set any trait by name (palette=mint, extra=none), the size from 16 to 1024 pixels, the shape, or a short trait code like k1.9.0.1.0.1.8 that the apps store when someone picks their own Kuberdon. Nothing falls back. An unknown parameter, a name that isn't in the list or a size out of range is a 400 that says what's wrong:
{ "error": "bad-request", "reason": "size must be a whole number from 16 to 1024" }
Send a hash, not a person
A seed is meant to be a hash, like the sha256 of a user id. Never a raw email address. Our apps always hash first. On this site, when you type an email into the Kuberdons editor, the browser hashes it with SubtleCrypto before it's used for anything.
The server doesn't log seeds or paths, and its errors print only an error's name, since a message could carry the seed. It keeps request counts and nothing else. The seed never ends up in the image either: the SVG's label is fixed and its ids are hashes.
The code isn't public yet. When it is, the code is MIT and the artwork is CC BY 4.0. The URL is free to use today.

Jensen Bernard
Founder, Kuberdon
Jensen started Kuberdon to build a portfolio of mobile apps that make everyday life more seamless. Right now most of his time goes to Kalendars, a calendar for iPhone (Mac coming soon) and the first app in the portfolio. He has a master’s in computer science from KU Leuven, and works from Leuven, Belgium.
