← Back to all tools

UUID Generator

Generate RFC 4122 compliant Version 4 UUIDs (Universally Unique Identifiers) instantly. Perfect for database primary keys, API tokens, session IDs, and any scenario requiring unique identifiers. Uses cryptographic randomness.

718b1142-d0b0-4969-a9e2-a5c84c373b49

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit identifier standardized by RFC 4122. UUIDs are designed to be unique across all devices and all time, without requiring a central authority. They are represented as 32 hexadecimal digits displayed in five groups separated by hyphens:xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx.

UUID Version 4

This tool generates Version 4 UUIDs, which are based entirely on random numbers. The "4" in the third group identifies the version, and the first digit of the fourth group (8, 9, a, or b) indicates the variant. With 122 random bits, the probability of generating two identical UUIDs is astronomically low — you'd need to generate about 2.71 × 1018 UUIDs to have a 50% chance of collision.

Common Use Cases

  • Database primary keys — UUIDs eliminate the need for auto-incrementing integers and work well in distributed systems.
  • API identifiers — expose UUIDs instead of sequential IDs to prevent enumeration attacks.
  • Session tokens — used as secure, unique session identifiers.
  • Distributed systems — multiple nodes can generate IDs independently without coordination.
  • File naming — generate unique, collision-free filenames for uploads.

Frequently Asked Questions

Are Version 4 UUIDs truly unique?

While not guaranteed unique in an absolute mathematical sense, the probability of collision is so astronomically low that it's considered safe for all practical purposes. You'd need to generate a billion UUIDs per second for 85 years to have a 50% chance of a single collision.

Should I use UUIDs vs auto-incrementing IDs?

UUIDs are better for distributed systems, microservices, and public-facing APIs where sequential IDs could leak information (total users, order count, etc.). Auto-incrementing IDs are more efficient for storage and indexing in single-database applications.

Why does the format have a specific structure?

The structure (8-4-4-4-12) is defined by RFC 4122. The "4" in the third group identifies this as a version 4 UUID. The first digit of the fourth group (8, 9, a, or b) indicates the variant. The remaining 122 bits are randomly generated.