UUID Generator (v4 and v7)
Generate random v4 or v7 UUIDs one at a time or in bulk.
Your data is never sent to any server.
The UUID generator creates unique identifiers in version 4, random, or version 7, sortable by time. Generate a single one or up to a thousand at once, and copy them or download them as a text file.
Anatomy of a UUID
018f3c2e-7b41-7c3a-9e2d-5f8a1b6c4d90
It is 32 hexadecimal digits in groups of 8, 4, 4, 4 and 12. The first digit of
the third group gives the version: here it is a 7, so this is a v7 UUID. In a
v7, the first 12 digits are the timestamp, which is why two UUIDs generated a
second apart start almost the same.
v4 or v7 in a database
v4 UUIDs arrive in random order, so every insert lands at a different point in the primary key’s index. With millions of rows that fragments the index and slows writes down. v7 UUIDs arrive in increasing order, like an auto-increment number, while keeping the advantage of being generated on any server without coordination. For a new table, v7 is usually the better choice; the only catch is that anyone who sees the UUID can tell when the record was created.
How to use UUID Generator
- 1
Choose the version
v4 generates fully random identifiers; v7 starts with the date and time, so they sort in order of creation.
- 2
Set how many you need
From 1 to 1000 at once, for example to fill in test data.
- 3
Generate the list
Press Generate UUIDs. You can regenerate it as many times as you like.
- 4
Copy or download them
Each UUID has its own copy button, Copy all puts them on your clipboard one per line, and Download .txt saves them to a file.
Frequently asked questions
What is a UUID?
A 128-bit identifier written as 32 hexadecimal digits in five hyphen-separated groups, 36 characters in total. It can be generated anywhere without asking anyone, with the practical certainty that it will not repeat.
What is the difference between v4 and v7?
A v4 is 122 random bits. A v7 uses its first 48 bits for a millisecond timestamp and the rest for randomness, so the ones generated later are larger and sort themselves by creation time.
When should I use v7 and when v4?
v7 for database primary keys: because they arrive in order, indexes stay compact and inserts are faster. v4 when you do not want the identifier to reveal when it was created, for example in public links.
Are the UUIDs generated here secure?
Yes. They come from the browser's cryptographic generator, crypto.randomUUID and crypto.getRandomValues, the same kind of randomness server libraries use.
Can two UUIDs ever repeat?
In theory yes, in practice no. With v4, to reach a 50% chance of a single repeat you would have to generate about a billion per second for more than 80 years.