Skip to content

UUID Generator (v4 & v7)Beta

Generate any number of v4 or v7 UUIDs, or paste one in to see its version, variant and (for v7) embedded timestamp. Everything runs in your browser.

Generate UUIDs

Version
Generate 1 to 1000 at a time.

Results

UUID inspector

How to use

Pick a version and a count (1 to 1000), then click “Generate” to create UUIDs in your browser. Turning on uppercase, no-hyphens or braces reshapes the output, and you can copy everything at once or download it as a .txt file. Paste a single UUID into the inspector below to see its version, variant, and — for v7 — the timestamp it carries.

The difference between v4 and v7

Version 4 fills all 122 non-fixed bits with cryptographically secure randomness, so nothing can be guessed from the value alone. The downside is that it has no sort order: used as a database primary key, new rows land at random positions in the index (poor locality), which causes frequent B-tree page splits and hurts cache hit rates. Version 7 stores a millisecond-precision creation timestamp in its first 48 bits, so the values themselves sort in creation order. Used as a primary key, new rows always append to the end of the index, which means fewer page splits and better cache locality. Both versions follow the RFC 9562 standard, and this tool generates the random portion with the browser’s cryptographic random function (crypto.getRandomValues).

Why it stays sorted within the same millisecond

Version 7 has 12 spare bits right after the timestamp (rand_a), and this tool increments that value for every UUID created within the same millisecond. As a result, generating several at once produces values whose plain string sort order matches the actual generation order.

How likely is a collision

Version 4 draws from a 122-bit random space, so even generating a billion per second, the odds of an accidental match are essentially zero (a birthday-problem calculation shows you’d need to generate more than 10^18 of them to reach a 50% chance of a collision). Version 7 has a smaller random portion — 74 bits — but because this tool counts up within the same millisecond, values generated in one batch never repeat.

Privacy

UUIDs are generated entirely inside your browser and are never sent to a server. Keep in mind that a v7 UUID carries its exact creation time, so use v4 instead for any value that must not reveal when it was created, such as an identifier meant to stay anonymous.

Sources

Frequently asked questions

Should I use UUID v4 or v7?

Use v7 when sort order and insert performance matter, such as a database primary key. Use v4 when nothing about the value should reveal when it was created. Both versions have a practically negligible chance of colliding.

Can two generated UUIDs collide by accident?

It's theoretically possible but the odds are vanishingly small. v4 draws from a 122-bit random space, and this tool's v7 generator also increments a counter for values created in the same millisecond so a single batch never repeats.

Can the timestamp in a v7 UUID reveal exactly when it was created?

Yes. The first 48 bits store the number of milliseconds since January 1, 1970, so pasting one into the inspector shows the exact creation date and time. That's why v4 is the safer choice when the creation time needs to stay hidden.

When would I use the no-hyphens or braces options?

The 32-character form without hyphens is convenient for filenames or some database columns, while the braced form is mainly used for Windows Registry entries and COM component GUIDs.