rs/xid
xid is a globally unique id generator thought for the web observed · 2026-08-28
Health v2 · maintenance only
67/100
- Activity 99
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3949
- days_rel: n/a
- days_push: 8
- n_releases_24m: 0
Adoption not part of the score
4282 stars · 214 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
xid is a Go library for generating globally unique, sortable 12-byte identifiers using the Mongo Object ID algorithm with a compact base32hex string encoding. It requires no configuration or central generator server, making it safe to use directly in server code.
Use cases
- generate unique ids for database records without a central coordinator
- create shorter URL-safe ids than UUIDs for web APIs
- generate sortable ids that sort by creation time
- replace UUIDs with more compact identifiers in Go services
- generate Mongo-compatible object IDs outside MongoDB
When to choose
- you need configuration-free globally unique ids in Go
- you want sortable, time-ordered identifiers
- you need compact URL-safe string ids (20 chars)
- you want Mongo Object ID binary compatibility
When to avoid
- you need cryptographically random, unguessable ids
- you require 128-bit uniqueness guarantees like UUIDv4
- your project is not in Go
- you need decentralized ids without machine-identifier assumptions
Facets
library · maturity stable
serialization developer-tools developer-tools databases web-development go cross-platform unique-id-generator sortable-ids mongodb-objectid base32hex uuid-alternative
1 source
- readme: https://github.com/rs/xid · fetched 2026-08-28 · 788296f7d94c
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| rs/xid | main | 67 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem