UUID Generator
() → uuidMake random v4 or time-sortable v7 identifiers, one or a thousand.
Generating…inspect a uuid
About UUID Generator
Generate identifiers in bulk, in either of the two versions worth using today. Version 4 is 122 random bits and the safe default when you just need something unique. Version 7 puts a millisecond timestamp in the leading 48 bits, so the values sort chronologically as plain strings — which is what makes them behave far better as a database primary key.
The randomness comes from your browser's cryptographic generator, the same source used for key material, not from Math.random. Paste an existing identifier into the inspector to read back its version and variant, and for a v7 or v1 value, the moment it was created.
Generation happens locally. That is worth knowing for a generator specifically: an identifier handed to you by a remote server is one that server has seen, and if it is going to key anything sensitive, you want to be the only party that ever held it.
Common questions
- Should I use v4 or v7?
- Use v7 for anything stored in a database, especially as a primary key. Random v4 values scatter inserts across the whole index, fragmenting it as the table grows; v7 values arrive in ascending order and append cleanly. Use v4 when ordering would leak something you would rather not disclose, such as signup sequence or creation time.
- Can two UUIDs ever collide?
- In practice, no. A version 4 UUID has 122 random bits, and you would need to generate on the order of a billion per second for decades before a collision became likely. That property is why they can be created independently on many machines without any coordination.
- Does a v7 UUID reveal when it was created?
- Yes — that is the point of it, and the inspector here reads the timestamp straight back out. Anyone holding the value can determine its creation time to the millisecond, so if that is sensitive in your context, use v4 instead.
- What about v1, and what happened to v6?
- Version 1 also encodes a timestamp but traditionally included the machine's MAC address, leaking hardware identity, and its time bits are arranged so the values do not sort. Versions 6 and 7 were standardised to fix that; v7 is the one to reach for in new work. The inspector still decodes v1 timestamps when you meet them in older data.
This page does the work itself, in this tab. Nothing you paste is sent to a server. Close the tab and no copy remains.