# segmentio/ksuid

K-Sortable Globally Unique IDs

Repository: https://github.com/segmentio/ksuid
Canonical: https://ross.abutalabs.com/products/ksuid
Homepage: https://segment.com/blog/a-brief-history-of-the-uuid/
Language: Go
License: MIT
License Family: permissive
Topics: ksuid, golang, go, uuid, coordination, unique-id
Last push: 2026-06-25T23:25:15+00:00

## Health v2 (maintenance only)
Score: 72/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 89, release rhythm 35, longevity 100
- inputs: {"age_days": 3402, "days_push": 69, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5266, forks 198 (observed 2026-08-28T04:09:13.888451+00:00)

## What it is
A Go library for generating and parsing KSUIDs (K-Sortable Unique IDentifiers), the reference implementation of the KSUID format. KSUIDs are globally unique identifiers that embed a timestamp so they sort naturally by generation time without coordination.

## Use cases
- generate unique IDs without a central coordinator
- generate sortable unique identifiers in Go
- replace UUIDv4 with time-ordered IDs
- generate collision-resistant IDs for distributed systems
- parse and inspect KSUID strings
- generate copy-paste friendly unique identifiers

## When to choose
- you need unique IDs in Go that sort by creation time
- you want coordination-free ID generation like Snowflake but without deployment complexity
- you need more entropy than UUIDv4 for collision/guessing resistance
- you want human-friendly, copy-paste-safe ID text representations

## When to avoid
- you need strict ordering guarantees rather than loose wall-clock ordering
- you need sequential 64-bit IDs and already have coordination infrastructure
- you must conform to the RFC 4122 UUID standard
- you need IDs shorter than 20 characters

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools, serialization
- domain: developer-tools, backend, microservices
- platform: go, cross-platform
- tags: ksuid, unique-ids, uuid-alternative, sortable-ids, id-generation

## Member repositories
- segmentio/ksuid (main) score 72

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:13.888451+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:59:29.782590+00:00, confidence not recorded.
  - readme: https://github.com/segmentio/ksuid (fetched 2026-08-28T04:09:13.888451+00:00, sha 4ba1ac7af780)
  - homepage: https://segment.com/blog/a-brief-history-of-the-uuid/ (fetched 2026-08-29T08:54:33.252764+00:00, sha 170954a82794)
  - site_page: https://www.twilio.com/docs (fetched 2026-08-29T08:54:33.259348+00:00, sha 241059188e22)
  - site_page: https://www.twilio.com/en-us/sms/pricing/us (fetched 2026-08-29T08:54:33.268499+00:00, sha 7a68aac7ffee)
  - site_page: https://www.twilio.com/en-us/integrations (fetched 2026-08-29T08:54:33.255435+00:00, sha 521abc67b836)
  - site_page: https://www.twilio.com/en-us/company (fetched 2026-08-29T08:54:33.257340+00:00, sha 6e66f2d5fb14)
  - site_page: https://www.twilio.com/en-us/changelog (fetched 2026-08-29T08:54:33.261304+00:00, sha b2c8f12d21a6)
  - site_page: https://www.twilio.com/en-us/pricing (fetched 2026-08-29T08:54:33.263243+00:00, sha 7c664e10035a)
  - site_page: https://www.twilio.com/en-us/products/conversational-ai/pricing (fetched 2026-08-29T08:54:33.265116+00:00, sha af24ed20527f)
  - site_page: https://www.twilio.com/en-us/pricing/messaging (fetched 2026-08-29T08:54:33.266806+00:00, sha eedf72634df2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
