$ uuid --gen

uuid generator.

Generate UUIDs v1, v4, or v7 in bulk. 100% client-side.

settings
version
quantity
results
0 UUIDs

Click "Generate" to create UUIDs

UUID v1 uses timestamp + MAC address (traceable). v4 is random (most common). v7 is time-ordered random, ideal for database primary keys.
Use v4 for most applications. Use v7 for database primary keys (better index performance due to sequential ordering). Use v1 only if you need timestamp tracking.
v4 has 2^122 possible values — the chance of collision is astronomically low (1 in 5.3 quintillion). For practical purposes, they are unique.

UUID Versions Compared

VersionMethodRandom?Best For
v1Timestamp + MAC addressTime-basedLegacy systems (leaks MAC!)
v3MD5 namespace hashDeterministicSame input → same UUID
v4RandomYesGeneral purpose, most common
v5SHA-1 namespace hashDeterministicSame input → same UUID (better than v3)
v7Timestamp + randomTime-orderedDatabase primary keys (new!)

Format Breakdown (v4)

xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
        |    |   |   |
        |    |   |   └─ version (4)
        |    |   └─ variant (8, 9, a, or b)
        |    └─ random
        └─ random

Database tip: UUID v7 is time-ordered, making it ideal for database primary keys — it avoids the random page splits that v4 causes in B-tree indexes.

learn more in our detailed guide.

→ read the guide