UUID Generator
Create version 4 UUIDs with crypto.randomUUID, then copy or download them.
Your data stays in your browser. This tool processes your input locally and does not upload it to a server.
Fully random. Best for opaque, unguessable IDs.
Generated with the browser's cryptographically secure random generator. Nothing is sent anywhere.
UUID v4 vs v7: which should you use?
Use v7 when IDs are database keys or need to sort by creation time (RFC 9562). Use v4 when the ID must reveal nothing, such as a public share link. v1 also embeds a timestamp but is rarely the right choice for new systems.
| Property | v4 (random) | v7 (time-ordered) |
|---|---|---|
| Structure | 122 random bits | 48-bit Unix ms timestamp + 74 random/counter bits |
| Sortable by creation time | No, order is random | Yes, sorts lexicographically by time |
| Database index locality | Poor: inserts scatter across the B-tree | Good: inserts append near the end |
| Reveals creation time | No | Yes, to the millisecond |
| Guessability | Unguessable (CSPRNG) | Time part is predictable; remaining bits are random |
| Best for | Opaque public IDs, tokens, session handles | Primary keys, event IDs, log and queue ordering |
What is a UUID, and should you use v4 or v7?
A UUID is a 128-bit identifier written as 32 hex digits in five hyphenated groups, designed to be unique without a central registry. Version 4 is purely random; version 7 starts with a millisecond timestamp so IDs sort by creation time. This generator creates v4, v7, v1, nil and max UUIDs in your browser.
v4 versus v7
UUIDv4 carries 122 random bits, so it reveals nothing and is a good opaque ID for public URLs and tokens. Because consecutive v4 values are unrelated, inserting them into an indexed database column scatters writes across the index, which can hurt performance on large tables.
UUIDv7, defined in RFC 9562, puts a 48-bit Unix millisecond timestamp first, followed by the version, a 12-bit counter, the variant bits and random bits. IDs created later compare greater, so they sort chronologically and insert near the end of an index. The trade-off is that a v7 ID discloses its creation time. Within one batch, this tool increments the counter when the millisecond repeats, so the output is strictly increasing.
Other versions, formats and exports
v1 combines a 100-nanosecond timestamp with a node id. This generator uses a random node id with the multicast bit set, as RFC 9562 allows, so your MAC address is never used. The nil UUID is all zeros and the max UUID is all ones; both are special markers rather than unique IDs.
Output can be uppercase, without hyphens, wrapped in braces (common in .NET and Windows) or written as a URN (urn:uuid:...). Generate up to 1000 at once, copy them all, or download as TXT, CSV or JSON. Randomness comes from the browser crypto API and nothing is sent to a server.
Examples
A v7 batch in one millisecond
Input
Version v7, quantity 3, clock fixed at 2026-12-01T12:00:00.000ZOutput
01a23179-de00-710e-b358-7da2c7ec1136
01a23179-de00-710f-b358-7da2c7ec1136
01a23179-de00-7110-b358-7da2c7ec1136The first 12 hex digits (01a23179de00) are the timestamp; the counter after the 7 rises by one each time, so the list sorts in creation order. Random-source values here are fixed for reproducibility, so real output differs in the random digits.
Format a UUID
Input
123e4567-e89b-42d3-a456-426614174000 with Uppercase on, Hyphens off, BracesOutput
{123E4567E89B42D3A456426614174000}URN format
Input
123e4567-e89b-42d3-a456-426614174000 with Wrapper: URNOutput
urn:uuid:123e4567-e89b-42d3-a456-426614174000The URN form always keeps hyphens.
Common mistakes and edge cases
- Using v7 where the creation time must stay private. The first 48 bits are a readable timestamp.
- Using v4 as a clustered primary key on a very large table and then wondering about index fragmentation; v7 is usually a better fit.
- Treating UUIDs as secrets. A UUID is an identifier, not an access control; use a proper random token with authorization checks for anything sensitive.
- Comparing UUIDs as strings with mixed case or braces. Normalise to lowercase hyphenated form (or compare the 16 bytes) first.
- Generating UUIDs with Math.random. It is not cryptographically secure; use crypto.randomUUID or crypto.getRandomValues, as this tool does.
- Assuming v7 is strictly ordered across multiple machines. Ordering is by millisecond, and clocks drift between hosts.
How to use this tool
- Choose how many UUIDs you need.
- Generate the list.
- Copy one, copy all, or download the list.
Frequently asked questions
What is the difference between UUID v4 and v7?
v4 is made of 122 random bits and has no structure you can read. v7 begins with a 48-bit Unix timestamp in milliseconds, then a counter and random bits, so newer IDs sort after older ones. Choose v7 for database primary keys, event logs and anything that benefits from time ordering. Choose v4 when the ID must not reveal when it was created, such as a public share link.
Are the generated UUIDs unique and random?
The random bits come from crypto.getRandomValues or crypto.randomUUID, which are cryptographically secure in modern browsers. With 122 random bits for v4, the chance of a collision is negligible for any realistic volume. v7 and v1 add a timestamp and a counter, so UUIDs generated in one batch are guaranteed distinct and ordered. Nothing is sent to a server.
Does the v1 option expose my MAC address?
No. Classic v1 used the machine MAC address as the node id, which leaks hardware identity. This generator creates a random 48-bit node id with the multicast bit set, which RFC 9562 specifies for exactly this case. A random clock sequence is also used. If you do not need v1 compatibility, v7 is the more modern time-based choice.
How many UUIDs can I generate and export?
Between 1 and 1000 per click. The results appear in a scrollable text box rather than one row per UUID, so large batches stay fast. You can copy them all with one click, or download the list as a TXT file (one per line), a CSV with an index column, or a JSON array. Uppercase, hyphen and wrapper choices apply to the copy and every download.
What are the nil and max UUIDs for?
The nil UUID, 00000000-0000-0000-0000-000000000000, represents "no UUID" and is handy as a placeholder or default. The max UUID, ffffffff-ffff-ffff-ffff-ffffffffffff, is its opposite and is useful as an upper bound in range queries. RFC 9562 defines both. They are constants, not unique identifiers, so do not use them as record IDs.
References
Last reviewed