🆔 UUID Generator

Generate universally unique identifiers using your browser’s cryptographic random number generator — the values never leave your machine. Version 4 is random; version 7 is time-ordered, which indexes far better as a database primary key.

1 to 1000.

What each version puts in the 128 bits

Both versions start from 16 bytes of crypto.getRandomValues, the browser's cryptographic generator. Six bits are then overwritten to declare the version and the RFC 4122 variant, which is why the 13th hex digit is always 4 or 7 and the 17th is 8, 9, a or b:

v4  xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx   122 random bits
v7  tttttttt-tttt-7xxx-yxxx-xxxxxxxxxxxx    48-bit ms timestamp
                                            + 74 random bits

A v7 made on 8 September 2026 begins 01a07e50-... - that prefix is just Date.now() in hex, so v7 values sort by creation time as text and stay compact in a B-tree index. Uniqueness rests entirely on the randomness: nothing is registered, no MAC address or serial number is involved, and no two machines coordinate.

Options and limits

This page writes no monotonic counter inside a millisecond, so v7 values created in the same millisecond sort arbitrarily against each other, and a wrong system clock puts them in the wrong place entirely.

Frequently asked questions

How likely is a duplicate UUID v4?

With 122 random bits you would need about 103 trillion of them before there was even a one in a billion chance of a single collision. The real risk is a weak random source, not the maths - which is why this page uses the browser's crypto API rather than Math.random.

Should I use UUID v4 or v7 for a database key?

v7, in most cases. Random v4 keys scatter inserts across the whole index and fragment it; v7 keys arrive in roughly ascending order, so new rows land at the end of the B-tree. Use v4 where the identifier is public and its creation time should stay private.

Are these UUIDs generated on your server?

No. They are produced in your browser and never sent anywhere, so a batch you copy has been seen only by your own machine.