UUID Generator

Generate UUID v4, v7 and v1 values, one at a time or up to 1000 at once — and paste a UUID you were handed to read back which version it is and when it was made. Everything runs in your browser; nothing is sent to a server.

Version
Format

v4 random

Cleared. Press “Regenerate” for a new batch.

Inspect a UUID

Paste a UUID from a log line or a database. Hyphenated, without dashes, in braces or in the urn:uuid: form — all of them work.

Which version to choose

A UUID is a 128-bit identifier you can mint without a central counter and without coordinating with anything else, and it still will not repeat. The real question is rarely “what is a UUID” — it is “which version goes in this column”. Two facts decide it: whether a batch sorts by creation time, and how many of the bits are genuinely random.

VersionRandom bitsSorts by timeWhen
v4 — random122 bitsNoThe right answer to almost every question. Nothing but random bits, so no information can be read back out of it.
v7 — Unix time74 bitsYesFor a database primary key. The timestamp comes first, so new rows append to the end of the index; v4 scatters across it and fragments it.
v1 — time and node62 bitsNoFor talking to older systems. The node field originally held a MAC address; a browser has no access to one, so a random node is used here.
Nil0 bitsNoMeans “no value”. For a NOT NULL column that needs something in it, and for tests.

Never use a version with a clock in it (v1, v6, v7) as a secret token: anyone who has seen one value can narrow down its neighbours. When you need an unguessable link or session id, use v4 — all 122 of its bits are random.

Frequently asked questions

What is a UUID, and why does it not repeat?

A UUID is a 128-bit identifier. Its whole value is that minting one needs no central counter and no agreement with anyone else: every server and every device makes its own and they still do not collide. That is why they are used in distributed systems, in mobile apps that work offline, and in file names.

For a database primary key, is v4 or v7 better?

v7. Because v4 is entirely random, each new row lands at a random point in the index — which fragments it and slows writes down on a large table. v7 puts the timestamp first, so values increase in creation order and new rows append to the end of the index. The trade-off is that the value reveals when it was made; if that is a problem for you, stay on v4.

Can two identical UUIDs ever come out?

Not in practice. v4 has 122 random bits, so the odds of a collision only become meaningful after more than five quintillion (5·10^18) values. Here they come from the browser's Web Crypto CSPRNG — not Math.random(), which was never built for this and whose output can be predicted.

Can I use a UUID as a token or a secret link?

v4, yes — it carries 122 random bits from a cryptographic generator. v1, v6 and v7, no: they start with a timestamp, so someone who has seen one link can narrow the search for other values made around the same moment. Use v4 for password-reset links and invitations.

Are the generated values sent to a server?

No. Everything is computed in your browser through the Web Crypto API — neither the values it generates nor the UUID you paste into the inspector is sent anywhere or stored. Close the page and it is all gone.