UUID v4 or v7?
- v4 is 122 bits of randomness. Use it when IDs shouldn't reveal anything, such as public links or API keys' IDs.
- v7 starts with a millisecond timestamp, so new IDs sort after older ones. Databases like PostgreSQL and MySQL index them much faster than v4 because inserts land at the end of the index. It's the best default for primary keys.
Formats
The standard form is 36 characters, xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx, where M is the version. Some systems want uppercase (Microsoft GUIDs), no hyphens (32 hex characters) or braces {…}. Toggle any of these, then copy all or download a .txt file.
Will I ever get a duplicate?
For v4, you'd need to generate about a billion UUIDs every second for 85 years to have a 50% chance of one collision. They're made with crypto.getRandomValues, the same source browsers use for encryption keys.
Questions people ask
What's the difference between a UUID and a GUID?
Nothing practical. GUID is Microsoft's name for the same 128-bit identifier.
How do I tell which version a UUID is?
The first character of the third group is the version. Paste a UUID into Check a UUID to see its version, variant and, for v1 and v7, when it was created.
Is UUID v7 a standard?
Yes. It was published in RFC 9562 in 2024, which replaced the original RFC 4122.
Can I generate UUIDs in bulk?
Yes, up to 1,000 at a time. Copy them all or download them as a text file, one per line.