Free tool UUID generator: v4 and v7 in bulk, plus a decoder
Create random version 4 UUIDs, or version 7 UUIDs that sort by creation time, up to 1,000 at a time and in the format your code expects. Paste existing UUIDs to see their version, variant and, for v1, v6 and v7, when they were made.
- v4 and v7 (RFC 9562)
- Up to 1,000 at once
- Generated in your browser
Generate or decode UUIDs
Ten fresh v4 UUIDs every time the page loads. Switch to v7 for IDs that sort by time, or decode the RFC 9562 sample values to see what a UUID gives away.
1 to 1,000.
One per line. Hyphens, braces, urn:uuid: and quotes are all accepted.
4c54ca06-c160-425e-9f52-4648f3a27c3b
500b7896-914c-4549-b20a-a17428781e13
9fa92dde-c11c-4aad-976c-5cbe66994511
89314f0c-9499-4a55-a817-e69b65071d31
794b087b-cf64-4564-bc0e-0a7a9f420bc0
0e8992c4-f9e3-4e6f-9e6e-4c4da4b40e4c
2010dd22-5a68-4de2-baaa-1bf2cd270dab
ec46ca8e-f140-4f28-a127-4cf1ef909571
8c885a86-4e9f-4afa-9ed7-9c35b66b6ca8
a9dfc0e2-5593-429a-9cbe-65288d83381aCopy or download. New values each time you click "Generate again".
Decoded
Times are shown in your browser’s time zone.
Checks
Version v1.0Updated Update history
Which UUID, and what it reveals
A UUID is 128 bits written as 32 hex digits. Six of those bits say how the rest was made.
The version digit
The first digit of the third group is the version: xxxxxxxx-xxxx-4xxx-… is v4, …-7xxx-… is v7. The first digit of the fourth group is 8, 9, a or b for standard UUIDs.
v4: random
122 random bits. With a good random source you would need about 2.7 × 1018 of them before the chance of a single duplicate reached 50% (the birthday bound for 122 bits). They reveal nothing, and sort in no order.
v7: time-ordered
The first 48 bits are milliseconds since 1970, so new IDs sort after old ones. That keeps database indexes compact, and also tells anyone who sees the ID when it was created.
Nil and Max
00000000-0000-0000-0000-000000000000 and the all-f UUID are special values meaning "none" and "all". They are fine as sentinels and wrong as real IDs.
v7 IDs leak their creation time to the millisecond. For public IDs where that matters, such as invitation links, use v4.
Three steps
Generate, format, copy.
-
1
Pick a version
v4 for general IDs, tokens and anything public; v7 for database primary keys and event IDs you want in time order.
-
2
Set count and format
Up to 1,000. Upper case and no hyphens suit some databases and APIs; braces match Microsoft GUID notation; JSON gives a ready array.
-
3
Copy or download
Copy the block, or download a .txt (or .json) file. To check a UUID you already have, switch to "Decode existing UUIDs".
How v4 and v7 use their 128 bits
RFC 9562 (May 2024) replaced RFC 4122 and added versions 6, 7 and 8. Both layouts below keep 4 version bits and 2 variant bits in fixed places.
- Random bits must come from a cryptographically secure generator (RFC 9562 §6.9); this page uses
crypto.getRandomValues - v7 within the same millisecond: this page treats the 12-bit rand_a as a counter, one of the methods in §6.2, so a batch is strictly ascending
- Built-in v4 generators:
crypto.randomUUID()in browsers and Node.js,uuid.uuid4()in Python,UUID.randomUUID()in Java - v7 is newer: Python 3.14 added
uuid.uuid7(); PostgreSQL 18 addeduuidv7()
| Bits | Version 4 | Version 7 |
|---|---|---|
| 0–47 (48) | Random | Unix time in milliseconds |
| 48–51 (4) | Version = 0100 | Version = 0111 |
| 52–63 (12) | Random | rand_a: random, or a counter |
| 64–65 (2) | Variant = 10 | Variant = 10 |
| 66–127 (62) | Random | rand_b: random |
Three UUIDs, one moment
RFC 9562’s appendix encodes the same instant, 2022-02-22 14:22:22 at UTC−5, as v1, v6 and v7. The decoder recovers it from each; the v4 example has nothing to recover.
| UUID | Version | Decoded time (UTC) | Note |
|---|---|---|---|
C232AB00-9414-11EC-B3C8-9F6BDECED846 | v1 | 2022-02-22 19:22:22.000 | Time split across groups, low bits first |
1EC9414C-232A-6B00-B3C8-9F6BDECED846 | v6 | 2022-02-22 19:22:22.000 | Same time, high bits first, so it sorts |
017F22E2-79B0-7CC3-98C4-DC0C0C07398F | v7 | 2022-02-22 19:22:22.000 | First 12 hex digits are 1645557742000 ms |
919108F7-52D1-4320-9BAC-F847DB4148A8 | v4 | — | Random, no time inside |
Times checked with Python’s uuid module (v1) and by reading the first 48 bits (v7). Click "Sample: decode RFC 9562 examples" to see the same results above.
Where UUIDs go wrong
UUIDs are easy to make. These are the ways they still cause trouble.
Math.random() UUIDs
Home-made generators built on Math.random() are not cryptographically random and can produce duplicates. Use crypto.randomUUID() or a maintained library.
Random v4 as a clustered key
Inserting random keys scatters writes across a B-tree index. v7 keeps new rows at the end; storing 16 bytes instead of a 36-character string also halves the size.
Leaking with v1 and v7
v1 can carry the MAC address of the machine that made it; v7 carries its creation time. Neither belongs in a URL where that matters.
Placeholder IDs
The Nil UUID, "0" or a shared default ID for every guest merges unrelated people into one record. Leave the ID empty until a real one exists.
IDs for people, devices and events
Analytics joins activity together by ID. A good ID is stable, unique and not personal data, which is exactly what a UUID from your own users table is.
Your user ID at sign-in
Call tapcub.login(id) with a stable internal ID, such as a UUID. Placeholders made only of zeros and hyphens, like the Nil UUID, are rejected, as are IDs over 200 characters.
Device ID only when enabled
By default the script stores nothing in the browser. In identified mode, with consent where required, it keeps a device ID made of a millisecond timestamp and 80 random bits: time-ordered like v7, though not in UUID format.
Learn moreOrder and refund events
Send backend events through the server API with an ID you control in the properties, so a refund can be matched to its order.
Learn moreUUID questions
Still have a question?
Chat with the team behind TapCub — we usually reply within a few hours on business days.
What is a UUID?
A universally unique identifier: 128 bits, usually written as 32 hex digits in groups of 8-4-4-4-12. Anyone can generate one without a central registry, and in practice they do not collide. GUID is Microsoft’s name for the same thing.
Should I use UUID v4 or v7?
Use v7 for database primary keys, event IDs and anything you want to sort by creation time; it keeps indexes compact. Use v4 when the ID is public and should reveal nothing, such as links and tokens.
Can two UUIDs ever be the same?
In theory yes, in practice no, as long as the random source is good. For v4 you would need around 2.7 × 1018 UUIDs for a 50% chance of a single duplicate. Real duplicates come from bad generators, such as ones built on Math.random() or cloned virtual machines with the same seed.
How do I tell which version a UUID is?
Look at the first character of the third group: …-4xxx-… is version 4, …-7xxx-… is version 7. Or paste it into "Decode existing UUIDs", which also shows the variant and, for v1, v6 and v7, the time it was created.
Is a UUID without hyphens still valid?
It is the same 128-bit value; hyphens are only formatting. RFC 9562 defines the hyphenated form as the standard text format, so add them back before sending to systems that validate strictly.
Are these UUIDs generated securely?
Yes. They are made in your browser with crypto.getRandomValues, the same cryptographically secure source crypto.randomUUID() uses. Nothing is sent to a server, and every click of "Generate again" produces new values.
Update history
New features, fixes and data refreshes for this tool, newest first.
-
· v1.0
LaunchedFirst release.
Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates
Give every signed-in user one profile
Identify users by your own ID, and TapCub joins their devices and visits into one person.