How to use it
- 1A new version 4 UUID appears as soon as the page loads. Click Copy to use it.
- 2Pick Version 7 for IDs that sort by creation time, and choose how many you need – up to 100.
- 3Turn on Uppercase, Without hyphens or In braces to match the format your code expects.
- 4Paste an existing UUID into “Inspect a UUID” to check that it’s valid and see its version, variant and, for time-based versions, when it was created.
What is a UUID?
A UUID (universally unique identifier), called a GUID in the Microsoft world, is a 128-bit number written as 32 hexadecimal digits in five groups, like f47ac10b-58cc-4372-a567-0e02b2c3d479. Any computer can create one without asking a central server, and it’s practically certain that nobody else will ever create the same one. That makes UUIDs popular as database keys, file names and request IDs – anywhere records are created in many places at once.
The format is defined by RFC 9562, which replaced RFC 4122 in 2024. The first digit of the third group is the version – 4 in the example above – and the first digit of the fourth group shows the variant, which is 8, 9, a or b for standard UUIDs.
Version 4 or version 7?
Version 4 is 122 bits of pure randomness. It reveals nothing about when or where it was made and is the right default for most uses. You would have to generate about 103 trillion of them to reach even a one-in-a-billion chance of a single duplicate.
Version 7 starts with a 48-bit timestamp in milliseconds, followed by random bits, so UUIDs created later sort after earlier ones. Databases then add new keys at the end of their indexes instead of at random places, which keeps inserts fast and indexes compact. The trade-off: anyone can read the creation time from the UUID, as the inspector on this page shows.
How these UUIDs are generated
Everything happens in your browser. Version 4 UUIDs come from crypto.randomUUID(), which draws on the operating system’s cryptographically secure random number generator. Version 7 UUIDs combine the current time with random bits from crypto.getRandomValues(), and a counter keeps them strictly increasing even when you generate many within the same millisecond, as RFC 9562 recommends.
Nothing is sent to a server or stored, so the IDs you generate here are yours alone.
Questions and answers
Are UUIDs really unique?
Not guaranteed, but close enough for any practical purpose. With 122 random bits, a version 4 collision is far less likely than a hardware fault corrupting your data. Duplicates only become a real risk when the random number generator is flawed, which is why this tool uses the browser’s cryptographic generator.
What is the difference between a UUID and a GUID?
None in practice. GUID (globally unique identifier) is Microsoft’s name for the same 128-bit format. Windows tools often show GUIDs in upper case and in braces, like {F47AC10B-58CC-4372-A567-0E02B2C3D479} – use the Uppercase and In braces options to match.
Should I use UUIDs as database primary keys?
They work well when records are created in many places, or when IDs mustn’t reveal how many records exist. Prefer version 7 over version 4 for primary keys: its time order keeps B-tree indexes compact and inserts fast. Store UUIDs in a native uuid column or as 16 bytes rather than as 36-character text.
Can I find out when a UUID was created?
Only for time-based versions. Versions 1, 6 and 7 contain a timestamp, which the inspector on this page decodes. Version 4 is purely random, and versions 3 and 5 are hashes of a name, so they carry no time at all.
Can I use a UUID as a secret token?
A version 4 UUID from a cryptographic generator is hard to guess, but it isn’t designed to be secret – UUIDs end up in logs, URLs and screenshots. For password-reset links, API keys or session tokens, use a dedicated random token instead. Never use version 7 as a secret, because part of it is a predictable timestamp.