UUID Generator (v4 & v7)
Generate UUIDs online — random UUID v4 or time-ordered UUID v7 — in bulk, with uppercase and no-hyphen formatting options. Validate an existing UUID and detect its version.
Validate a UUID
Paste a UUID below to check whether it's correctly formatted and detect its version.
What is a UUID?
A UUID (universally unique identifier) is a 128-bit value that can be created anywhere, without a central registry, with a negligible chance of clashing with any other. The current specification is RFC 9562 (2024), which replaced RFC 4122 and added versions 6, 7 and 8. The usual text form is 32 hexadecimal digits in five groups, 8-4-4-4-12, for example 550e8400-e29b-41d4-a716-446655440000. Microsoft’s name for the same thing is GUID.
Two digits tell you how a UUID was made. The first digit of the third group is the version (the 4 in 41d4), and the first digit of the fourth group is the variant, which is 8, 9, a or b for RFC 9562 UUIDs.
How to use the UUID generator
- Pick a Version: v4 (random) or v7 (time-ordered).
- Set Count from 1 to 1000. Values outside that range are clamped.
- Tick Uppercase or No hyphens if the receiving system needs that format.
- Click Generate. Each UUID goes on its own line. Five v4 UUIDs are generated when the page loads.
- Use Copy, the copy icon, or Download to save
uuids.txt. Clear empties the list.
The Validate box above checks one UUID as you type and reports its version. It expects the 36-character hyphenated form in either case; remove braces, a urn:uuid: prefix or quotes first. It recognises the nil UUID (all zeros) and the max UUID (all f), and flags version digits that RFC 9562 does not define.
How this tool builds each version
- v4 takes 16 bytes from
crypto.getRandomValues, the browser’s cryptographically secure random number generator, then sets the version and variant bits. That leaves 122 random bits. - v7 puts the current Unix time in milliseconds (
Date.now()) in the first 48 bits, then the version, then 74 random bits from the same secure generator. UUIDs created in the same millisecond share their first 12 digits. RFC 9562 describes optional counters to keep those in order; this tool does not use one, but it sorts each batch, so a list generated in one click is in ascending order.
Reading the time inside a v7 UUID
The first 12 hex digits of a v7 UUID, ignoring hyphens, are the creation time in milliseconds. In 019b76da-a800-7a3e-9c41-5d2e8f0b7a61 they are 019b76daa800:
const ms = parseInt('019b76daa800', 16); // 1767225600000
new Date(ms).toISOString(); // '2026-01-01T00:00:00.000Z'
Paste the millisecond value into the Unix Timestamp Converter to see it in your own time zone.
Which UUID version should you use?
| Version | Built from | Good for | Generated here |
|---|---|---|---|
| v4 | 122 random bits | General IDs where order does not matter and creation time should not be visible | Yes |
| v7 | 48-bit millisecond timestamp + 74 random bits | Database keys and event IDs, where time order keeps B-tree indexes compact | Yes |
| v1 / v6 | Timestamp + clock sequence + node ID | Legacy systems; RFC 9562 recommends v7 for new designs | No |
| v3 / v5 | MD5 / SHA-1 hash of a namespace and a name | The same name must always map to the same UUID | No |
| nil / max | All zeros / all ones | Sentinel values for “no value” and “end of list” | Validated only |
How likely is a collision?
For v4, the probability that any two of n UUIDs are equal is roughly n² ÷ 2123. For a billion UUIDs that is about 9 × 10−20, and you would need around 2.7 × 1018 of them before the chance reached one half. For v7, only UUIDs from the same millisecond can collide, and those still differ in 74 random bits. In practice, the risk comes from bad random sources or copied values, not from the maths, which is why this tool uses the secure generator rather than Math.random().
Frequently asked questions
Is a UUID a secret or a security token?
No. RFC 9562 advises against treating UUIDs as hard to guess. A v4 UUID from a secure generator is unpredictable, but UUIDs appear in URLs, logs and APIs, and a v7 UUID openly contains its creation time. For password-reset links or API keys, use a dedicated random token and check permissions on the server.
Are UUIDs case-sensitive?
No. RFC 9562 says to output lowercase but accept either case on input, and this tool’s validator does both. Some databases compare stored text exactly, though, so pick one form and stick to it.
How should I store a UUID in a database?
Use a native UUID column type where your database has one, or a 16-byte binary column. Storing the 36-character string works, but it takes more than twice the space and makes indexes larger.
Why do my v7 UUIDs from different clicks look almost the same?
Because the first 12 digits are a timestamp, UUIDs created close together start with the same digits and differ only towards the end. That shared prefix is exactly what keeps them in order.
Can I check a UUID in code?
A pattern such as ^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ with the i flag matches standard UUIDs of versions 1 to 8. Try it in the Regex Tester. Many languages also have a UUID parser that does this for you.
Are the UUIDs I generate stored or sent anywhere?
No. They are generated in your browser and exist only on this page until you copy or download them. Nothing is recorded, so a list cannot be recovered after you leave the page.