UUID Generator
Generate v4 or v7 UUIDs using the platform CSPRNG.
Loading tool…
About this tool
v4 is 122 random bits. v7 puts a millisecond timestamp in the high bits, so identifiers sort chronologically — useful as a database primary key where v4 fragments your index.
Limitations
- Generated in this tab and never recorded, so refreshing the page loses them. Copy what you need first.
Questions
- Should I use v4 or v7?
- Use v7 for database primary keys: random keys scatter B-tree inserts across the index, while time-ordered ones append, which keeps pages in memory and the index compact. Use v4 when the identifier is publicly visible and its creation time should not be — a v7 UUID reveals when it was made, to the millisecond.
- Could two of these collide?
- Not in any practical sense. A v4 UUID has 122 random bits; you would need to generate billions per second for many years before a collision became likely.
- Are these random enough to use as secret tokens?
- They come from the platform CSPRNG, so they are unpredictable. But a UUID's job is uniqueness, not secrecy — it often ends up in logs and URLs. Use a purpose-built secret for anything that grants access.
Privacy
This page does its work in your browser. What you paste is processed by JavaScript running on your own device and is never sent to a DevToolery server — there is no server that could receive it. The page itself is a static file delivered by a CDN. See exactly what is stored.