Home › Generators & Text Tools › UUID Generator

UUID Generator

Our free UUID generator creates version 1, version 4, or version 7 UUIDs right in your browser. Pick a version and a format — upper or lower case, with or without hyphens, or wrapped in braces — generate up to 50 at a time, then copy any value with a single click — no sign-up, no download, and nothing sent to a server.

v4 is fully random. v1 packs the current time into the value; v7 starts with the current time, so values sort in creation order.

Your UUIDs will appear here
Click Generate to create fresh version 4 UUIDs.

Generated locally with crypto.getRandomValues — the secure random source built into your browser.

How it works

A UUID is a 128-bit identifier written as 32 hexadecimal characters (the digits 0–9 and the letters a–f) arranged in five groups of 8, 4, 4, 4, and 12 characters, joined by hyphens. A typical example looks like this: 550e8400-e29b-41d4-a716-446655440000. The groups are not separate fields you need to understand; the whole 36-character string, hyphens included, is the identifier.

Version 4 is the random flavor of UUID. When this tool generates a value, it asks your browser for 16 random bytes through crypto.getRandomValues, which draws on your operating system’s secure random number source. It then sets two marker bits: the first character of the third group is forced to 4, which is the version number, and the first character of the fourth group is forced to 8, 9, a, or b, which marks the standard variant. The other 122 bits stay fully random.

Version 1 is time-based instead of random. It takes the current time counted in 100-nanosecond steps since 15 October 1582, splits it across the first three groups, adds a clock sequence (which changes if the clock is ever set backwards) and a random 48-bit node address, and marks the version with a 1 as the first character of the third group. Two version 1 UUIDs made at different moments can never match, because the time part is different.

Version 7 is time-ordered. Its first 48 bits are the current Unix time in milliseconds, so the values sort in the order they were created — handy when a UUID is also a database key and you want new rows to land next to each other instead of scattered at random. The remaining bits are random, with a 7 marking the version and the same 8, 9, a, or b variant digit. All three versions are built locally in your browser: version 4 and the random parts of versions 1 and 7 use crypto.getRandomValues, while the time parts use the clock on your own device.

UUID v4 = xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx  ·  v1 = time-based, 3rd group starts with 1  ·  v7 = Unix time first, 3rd group starts with 7, where x is a random hex digit and y is 8, 9, a, or b

That structure is why you can check a UUID by eye. If the 15th character is a 4 and the 20th character is 8, 9, a, or b, it is a valid version 4 UUID. Every value this tool produces passes that check, because the version and variant digits are set deliberately rather than left to chance.

Worked example

Suppose you are building a small web app and need a unique ID for a new user record. You select “1 UUID” and click Generate. The tool might return:

3f6d1a2b-9c4e-4d8a-b7f1-5e2a8c9d0f41

Check it against the pattern. It has five groups of 8, 4, 4, 4, and 12 hexadecimal characters, joined by four hyphens, for a total of 36 characters. The first character of the third group is 4, confirming version 4, and the first character of the fourth group is b, which is one of the four allowed variant digits. It is a valid UUID v4, and you can paste it straight into your database as the user’s primary key.

Now generate five at once for a batch import. Each of the five values is drawn independently, so no two will match. If you need a bigger batch, choose 25 or 50 from the quantity list and copy them all at once; the chance of ever seeing a repeat is so small that the entire internet could generate UUIDs for a century without a collision. If your code expects a different shape, switch the format — upper case, no hyphens, or wrapped in braces — and generate again; the values stay the same kind of UUID, only the spelling changes.

When to use a UUID

Developers use UUIDs as primary keys in databases, because two servers can create records at the same time without ever picking the same key. That is a big advantage over counting up from 1, which breaks the moment two systems try to write at once.

UUIDs are also handy as file names, session tokens, order references, and test data. Because they reveal nothing about how many records you have or when a record was created, they are safer to expose in a URL than a simple number like /order/42, which tells anyone that order 41 and order 43 probably exist too.

One caution: a UUID is random, not secret. Never use one as a password or as the only protection on a private document. For that, use a proper password or an access token with an expiry date.

FAQ

What is a UUID?

A UUID, or Universally Unique Identifier, is a 128-bit label written as 32 hexadecimal characters in five groups separated by hyphens, like 550e8400-e29b-41d4-a716-446655440000. It is designed so that two independently generated UUIDs are practically never the same.

What is UUID version 4?

Version 4 means the UUID is built from random numbers. The first digit of the third group is always 4, marking the version, and the first digit of the fourth group is 8, 9, a, or b, marking the variant. Version 4 is the default here, but this tool can also generate versions 1 and 7.

What are UUID versions 1 and 7?

Version 1 is time-based: it packs the current time, a clock sequence, and a random node address into the UUID, so values made at different times never collide. Version 7 is time-ordered: it starts with the current Unix time in milliseconds, so UUIDs sort in the order they were created, which suits database keys. Both are generated locally in your browser.

Are these UUIDs safe to use in my database?

Yes. This tool uses your browser’s built-in crypto.getRandomValues function, which draws on the operating system’s secure random number source. That is the same source recommended for generating identifiers in production applications.

Can two UUIDs from this tool ever be the same?

In practice, no. A version 4 UUID has 122 random bits, so there are about 5.3 × 10^36 possible values. Even generating a billion UUIDs per second for 85 years would still leave the chance of one collision below one in a billion.

Are the UUIDs sent to a server?

No. Every UUID is generated locally in your browser with crypto.getRandomValues. Nothing is uploaded, stored, or logged, so the values are private to you.