A UUID is a 128-bit unique identifier for database keys, request IDs, and more. Learn what UUIDs are, the versions (v4/v1/v5), when to use them, and how to generate them free online.
A UUID — like 550e8400-e29b-41d4-a716-446655440000 — is a 128-bit identifier that's practically guaranteed to be unique, even when generated on different machines with no coordination. That property makes UUIDs the go-to for database keys, request IDs, file names, and anything that needs to be unique without a central counter. Here's what they are and how to generate them.
A UUID (Universally Unique Identifier, also called a GUID) is a 36-character string of hex digits split into five groups. The odds of two randomly generated UUIDs colliding are so astronomically small that, in practice, you can treat every one as unique — which is why they're used across distributed systems where a simple auto-incrementing number won't work.
| Version | Based on | Best for |
|---|---|---|
| v4 | Random | The default choice — general-purpose unique IDs |
| v1 | Timestamp + node | When you want roughly time-ordered IDs |
| v5 | Namespace + name (hashed) | Deterministic IDs — same input always gives the same UUID |
UUIDs give you collision-free unique identifiers without a central counter — ideal for distributed systems, public IDs, and client-side generation. Reach for v4 by default, store them in a native type, and remember they're unique, not secret. Generate one or a whole batch with the ToolsGravity UUID Generator in your browser.