UUIDs generator
Generate UUIDs (v1, v4) for unique identifiers
TL;DR
What is UUIDs generator?
A UUID (Universally Unique Identifier) is a 128-bit identifier standardized in RFC 4122, formatted as 32 hexadecimal digits in the pattern 8-4-4-4-12 (e.g. 550e8400-e29b-41d4-a716-446655440000). This tool supports all common versions: NIL (all zeros), v1 (timestamp-based), v3 (MD5 name-based), v4 (random), and v5 (SHA-1 name-based).
Common use cases
- ‣Database primary keys: assign IDs without an auto-increment sequence, enabling client-side ID generation before a record is persisted
- ‣Distributed systems: multiple nodes generate IDs simultaneously without coordination or collision
- ‣Deterministic IDs: v3 and v5 always produce the same UUID for the same namespace and name, useful for canonical resource identifiers
- ‣Correlation IDs: tag log entries and API requests with a unique ID to trace a request across services
Frequently asked questions
Which UUID version should I use?
v4 (random) is the right default for most applications. Use v5 when you need the same UUID to be reproducible from the same input (e.g. a canonical URL or username). Use v1 for time-sortable IDs in systems like Cassandra. Use NIL as a sentinel for an unset UUID field.
What is the difference between v3 and v5?
Both generate a deterministic UUID by hashing a namespace UUID concatenated with a name. v3 uses MD5, v5 uses SHA-1. Prefer v5 for new work. The same namespace and name always produce the same UUID regardless of platform or language.
When should I use a ULID instead?
Use a ULID when you need both uniqueness and lexicographic time-sorting. v4 UUIDs are random and do not sort by creation time. ULIDs embed a 48-bit millisecond timestamp prefix, so sorting them alphabetically also sorts them chronologically.
See also
- ‣ULID generator: ULIDs encode a millisecond timestamp in the first 10 characters, giving you the same uniqueness as UUID v4 but with lexicographic time-ordering
- ‣Token generator: for unstructured random secrets such as API keys and session tokens, a raw random token is simpler than a UUID