UUID Generator

Generate UUIDs in all versions — v1, v3, v4, v5, v7, and Nil. Bulk generate, copy, and customize.

UUID Version

Random — cryptographically random, most commonly used

5c5d1c9e-3dd8-470f-b010-44cecbea17f4

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit identifier that is unique across space and time. UUIDs are used as primary keys in databases, request IDs in distributed systems, and session identifiers in web applications. This generator supports UUID v1 (timestamp-based), v3 (MD5 hash), v4 (random), v5 (SHA-1 hash), and v7 (timestamp-ordered).

Common Use Cases

  • Generating primary keys for database records
  • Creating unique identifiers for distributed systems
  • Generating correlation IDs for request tracing
  • Creating unique file names or session tokens
  • Bulk generating UUIDs for test data

Frequently Asked Questions

What is the difference between UUID v4 and v7?

UUID v4 is completely random, while UUID v7 embeds a Unix timestamp in the first 48 bits followed by random data. v7 is better for database primary keys because the time-ordering improves index performance and allows rough time-based sorting.

Can two UUIDs be the same?

Theoretically yes, but the probability is astronomically low. UUID v4 has 122 random bits, giving 5.3 × 10^36 possible values. You'd need to generate 2.71 × 10^18 UUIDs to have a 50% chance of a single collision.

Should I use UUID or auto-increment IDs?

Use UUIDs when you need IDs that are unique across multiple databases, services, or before database insertion. Use auto-increment when you need sequential, compact IDs and only write to a single database.