UltKit

UUID Generator

Create random version 4 UUIDs, from one to a hundred at a time, and copy them as a list. They come from your browser's cryptographically secure random generator, and a checker tells you the version and variant of any UUID you paste.

0 characters · 0 words · 0 lines

Runs entirely in this browser tab. Your text is never uploaded or stored.

UUID versions

The version is the first digit of the third group; the variant is encoded in the first digit of the fourth group (8, 9, a or b for RFC UUIDs). Examples are the test vectors from RFC 9562.

VersionBuilt fromExample
v1Gregorian timestamp + node (MAC) IDc232ab00-9414-11ec-b3c8-9f6bdeced846
v3MD5 hash of a namespace + name5df41881-3aed-3515-88a7-2f4a814cf09e
v4122 random bits919108f7-52d1-4320-9bac-f847db4148a8
v5SHA-1 hash of a namespace + name2ed6657d-e927-568b-95e1-2665a8aea6a2
v6v1 timestamp reordered so IDs sort by time1ec9414c-232a-6b00-b3c8-9f6bdeced846
v7Unix milliseconds + random bits, sortable017f22e2-79b0-7cc3-98c4-dc0c0c07398f
v8Custom layout defined by the application2489e9ad-2ee2-8e00-8ec9-32d5f69181c0

What a UUID is and how to read one

A UUID (universally unique identifier, called a GUID in Microsoft software) is a 128-bit number written as 32 hexadecimal digits in groups of 8-4-4-4-12, for example f47ac10b-58cc-4372-a567-0e02b2c3d479. It was standardized in RFC 4122 in 2005; in May 2024 that document was replaced by RFC 9562, which keeps the old versions and adds three new ones. Two positions are fixed: the first digit of the third group is the version (the 4 in 4372), and the first digit of the fourth group shows the variant, which is 8, 9, a or b for every UUID that follows the RFC.

Version 4 fills the other 122 bits with random data. That space is so large that you would need to generate about 2.7 quintillion (2.7 × 10¹⁸) of them for a 50% chance of a single duplicate, which is why systems create v4 IDs independently on many machines without coordinating. This page uses crypto.randomUUID, or crypto.getRandomValues where that is missing, never Math.random, whose output is not designed to be unpredictable. The Uppercase and Without hyphens options change only the formatting; the value is the same, and most parsers accept either case.

v4, v7 and the other versions

Versions 1 and 6 are built from a timestamp and a node ID, originally the computer's MAC address, which leaks where and when the ID was made. Versions 3 and 5 hash a namespace and a name with MD5 or SHA-1, so the same input always yields the same UUID. Version 8 is a free layout for custom schemes. The newcomer that matters most is version 7: it starts with a 48-bit Unix timestamp in milliseconds and fills the rest with random bits, so IDs sort by creation time.

That ordering is the reason to consider v7 for database primary keys. Random v4 keys land all over a B-tree index, splitting pages and hurting cache locality as a table grows, while v7 keys arrive in roughly increasing order like an auto-increment column, yet can still be generated without a central counter. Choose v4 when you want an ID that reveals nothing, including when it was created; choose v7 when insert performance and time ordering matter. A UUID is an identifier, not a secret: for passwords and API secrets use a dedicated password generator. More encoders and inspectors are in the developer tools.

Frequently asked questions

Can two randomly generated UUIDs ever be the same?
In theory yes, in practice no. With 122 random bits, even a billion v4 UUIDs per second for about 86 years would give only around a 50% chance of one collision, provided the random source is sound.
What is the difference between a UUID and a GUID?
None in substance. GUID is Microsoft's name for the same 128-bit identifier. Some Microsoft tools show GUIDs in upper case or wrapped in curly braces, which the checker here accepts.
How can I tell which version a UUID is?
Look at the first digit of the third group: 4 means random, 7 means time-ordered, 1 means timestamp plus node. Paste it into Check a UUID to see the version and variant.
Should I use UUIDv7 instead of v4 for database keys?
Often yes. v7 keys are time-ordered, which keeps B-tree indexes compact and inserts fast. Stick with v4 if the creation time embedded in a v7 ID should stay private.
Is it safe to use a UUID as a password reset token?
A v4 UUID from a secure generator has 122 random bits, which is enough to be unguessable, but many libraries offer dedicated token functions with explicit expiry. Never use time-based versions such as v1 or v7 as secrets.