UUID vs GUID: What's the Difference?
Understand the difference between UUID and GUID, the different UUID versions, and when to use each.
UUID and GUID: The Same Thing
UUID (Universally Unique Identifier) and GUID (Globally Unique Identifier) are essentially the same thing. Microsoft coined "GUID" while the broader standard uses "UUID". Both follow the same RFC 4122 specification.
Format: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
Example: 550e8400-e29b-41d4-a716-446655440000
UUID Versions
UUID v1 - Timestamp-based
Generated from the current timestamp + MAC address. Can reveal when and where it was generated.
UUID v4 - Random (most common)
Generated from random or pseudo-random numbers. 122 bits of randomness.
f47ac10b-58cc-4372-a567-0e02b2c3d479
UUID v5 - SHA-1 hash based
Deterministic: same inputs always produce the same UUID. Useful for content-addressed identifiers.
Collision Probability
For UUID v4: generating 1 billion UUIDs per second for 100 years, the probability of a single collision is roughly 50%. In practice, UUIDs are safe to use without collision checks.
When to Use UUIDs
- Distributed systems: No central ID coordinator needed
- Public-facing IDs: Harder to enumerate than sequential integers
- Database primary keys: Enables ID generation at the application layer
- Idempotent operations: Use as request IDs for deduplication
Generate UUIDs with our UUID Generator.