You Don't Need UUID

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. cuid2

    Next generation guids. Secure, collision-resistant ids optimized for horizontal scaling and performance.

    - a "fingerprint" of some number of bytes taken from the same entropy source

    [0] https://github.com/paralleldrive/cuid2/blob/fb07094487ba5ad0...

    this is an awful lot of work to be doing for each ID, and I'm not how it yields anything superior to a plain old UUID, but maybe I'm just being cynical, idk

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. typeid

    Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs

    IMO, a good middleground is using schemes like TypeID[0], ulid[1], or KSUID[2] that provides a more compact and readable (base32) representation and provides better database locality (K-sortable).

    [0] https://github.com/jetpack-io/typeid

  4. nanoid

    A tiny (124 bytes), secure, URL-friendly, unique string ID generator for JavaScript

    I usually go for Nano Id for new projects https://github.com/ai/nanoid

  5. bip39

    A web tool for converting BIP39 mnemonic codes

  6. Does this help see what's wrong with UUIDs in URLs?

      https://github.com/a73ba12d-1d8b-2516-3aee-4b15e563a835/e16957bf-7d7f-41f1-97f4-98c93a6c3540/issues/4e4e9133-bcdb-45b9-8dfe-9e951846e3c6

  7. keripy

    Key Event Receipt Infrastructure - the spec and implementation of the KERI protocol

  8. spec

    The canonical spec for ulid

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. ksuid

    K-Sortable Globally Unique IDs

  11. btcutil

    Provides bitcoin-specific convenience functions and types

    Your IDs are []byte of len=11. Those bytes can be represented in many ways.

    You can represent them as hex strings via encoding/hex.EncodeToString(id), or base64 strings via encoding/base64.StdEncoding.EncodeToString(id), or base32 strings via encoding/base32.StdEncoding.EncodeToString(id), or etc.

    Looks like the most used base58 package is https://pkg.go.dev/github.com/btcsuite/btcutil/base58, but looking at the implementation [0] I'm not impressed, and confident there's a better implementation

    [0] https://github.com/btcsuite/btcutil/blob/v1.0.2/base58/base5...

    But how you encode 11 bytes of data is kind of orthogonal to the important thing, which is that you have 11 bytes of data. They should be always be store in memory (in your application, or a DB, or anything else) as the actual 11 bytes of the ID, and not as a base58 or base64 or JSON or whatever other kind of string that can be decoded to the actual 11 bytes of data.

    Likewise, a UUID shouldn't be stored as a string like "64d3f2e0-a4dc-48d3-98ad-7f09eb3b082f", that's a specific encoding of the actual 16 UUID bytes, you should store, process, etc. those bytes directly.

  12. dxid

    A better and safer way to display your primary keys in urls or in your app

    you might want to consider an alternative with a base32 encoding with a luhn checksum

    https://github.com/tttp/dxid

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs

    19 projects | news.ycombinator.com | 28 Jun 2023
  • Moving Away from UUIDs

    7 projects | news.ycombinator.com | 21 Nov 2022
  • rs-nanoid: efficient NanoID generation in Rust

    3 projects | /r/rust | 14 Oct 2022
  • UUIDs are a wonderful invention

    3 projects | /r/ProgrammerHumor | 10 Aug 2022
  • 🧩 UUID vs ULID vs Integer IDs: A Technical Guide for Modern Systems

    1 project | dev.to | 6 Feb 2025

Did you know that JavaScript is
the 3rd most popular programming language
based on number of references?