UUID generator
Generate UUID v4 (random) and v7 (time-ordered) in batches
Choose a version, quantity and letter case, then generate. v4 is random; v7 includes milliseconds but is not strictly ordered within one millisecond.
Example
Input
Version: 4 · Count: 1
Example result
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
y ∈ {8, 9, a, b}This is a format diagram. Actual generated values change each time.
Technical details & limits
UUIDs contain 128 bits in 8-4-4-4-12 hexadecimal groups. v4 has 122 random bits after version and variant bits. This v7 implementation uses a 48-bit Unix millisecond timestamp plus random fields from crypto.getRandomValues. It has no monotonic counter within one millisecond.
About this tool
Generate batches of UUID v4 or v7, choose the quantity and letter case, and copy the results. v4 provides random identifiers; v7 carries a millisecond timestamp for approximate chronological ordering.
Use cases
- Seed a database with random primary keys.
- Produce message or session IDs for distributed systems.
- Pick v7 for records that must sort by creation time so B-tree indexes do not fragment.
How to use
- Choose version (v4 or v7), count, and case.
- Click Generate to produce one UUID per line, then copy the results.
Notes
v4 uses cryptographic randomness. This v7 implementation combines milliseconds with random fields and does not guarantee strict ordering within a millisecond.
FAQ
- When should I use v4 vs v7?
- v4 when you want pure randomness with no time signal. v7 when records should sort by creation time — much better for index locality.
- How unique is a UUID?
- v4 has 122 random bits. Collision probability depends on how many IDs are generated, so it is not a fixed number. Keep unique constraints and handle rare collisions.
- Why do consecutive v7 UUIDs share a prefix?
- The first 48 bits are the millisecond timestamp. IDs generated in the same millisecond share that prefix — that is what makes v7 time-ordered.
- Does v7 reveal when it was generated?
- Yes. Its first 48 bits carry the millisecond timestamp. An identifier is not an access credential; uniqueness and authorization are separate requirements.
- Are uppercase and lowercase UUID strings different IDs?
- Letter case does not change the hexadecimal value, but a target system may compare strings case-sensitively. Use a consistent representation and follow the interface contract.
Related tools