UUID Generator

Generate one UUID or a thousand. Version 4 is pure randomness; version 7 embeds a timestamp so the values sort chronologically, which your database index will thank you for.

Runs entirely in your browser. Nothing you paste is uploaded.

Generated UUIDs
Click Generate to create UUIDs...

About the UUID Generator

UUID v4 is 122 bits of randomness. Collisions are not a practical concern: you would need to generate roughly a billion per second for 85 years to reach a 50% chance of one. The catch is that random values scatter across a B-tree index, which fragments pages and slows inserts on large tables.

UUID v7 fixes exactly that. The first 48 bits are a Unix millisecond timestamp, so newly generated values sort after older ones and land at the end of the index. If you are choosing a primary key type today and want UUIDs, v7 is almost always the better choice.

Frequently asked questions

Should I use UUID v4 or v7 for database keys?

v7. The embedded timestamp keeps inserts sequential in the index instead of scattering them, which measurably improves write performance and reduces fragmentation on large tables.

Are these UUIDs cryptographically secure?

Yes. Random bits come from crypto.getRandomValues(), the browser's CSPRNG, not Math.random().

Does UUID v7 leak information?

It reveals the creation time to millisecond precision, which is inherent to the design. If the creation time is sensitive, use v4.