UUID generator

Make random version 4 or time-ordered version 7 UUIDs, one or a thousand at a time, and decode any UUID you paste in. Runs in your browser; nothing is uploaded.

Version

Validate and decode a UUID

How to use the UUID generator

  1. Pick v4 for fully random IDs or v7 for IDs that sort by creation time.
  2. Enter how many you need, from 1 to 1,000, and press Generate (or Enter in the number box).
  3. Tick Uppercase, No hyphens or Braces to match the format your code or database expects. The list updates straight away.
  4. Press Copy all to copy the list, one UUID per line, or Download .txt to save it.
  5. To check a UUID, paste it into the decoder. It tells you whether it is well formed, which version and variant it is and, for time-based UUIDs, when it was created.

What a UUID is

A UUID (universally unique identifier) is a 128-bit number used to label things without a central authority handing out numbers. Any computer can create one and be confident nobody else will create the same value. They are written as 32 hexadecimal digits in five groups separated by hyphens, 8-4-4-4-12, for example f47ac10b-58cc-4372-a567-0e02b2c3d479. The current standard is RFC 9562 (May 2024), which replaced RFC 4122 and added versions 6, 7 and 8.

Two fields are fixed in every standard UUID. The first hex digit of the third group is the version (the 4 in 4372 above), and the first hex digit of the fourth group is the variant, which is 8, 9, a or b for RFC 9562 UUIDs. That is how the decoder can tell what kind of UUID you have.

VersionHow it is madeUse it when
v1Time (100 ns steps since 1582) plus a node ID, often the MAC addressLegacy systems only; it can reveal the machine
v3 / v5MD5 / SHA-1 hash of a namespace and a nameThe same input must always give the same UUID
v4122 random bitsGeneral-purpose IDs where order does not matter
v6v1 rearranged so it sorts by timeUpgrading v1 systems
v748-bit Unix time in milliseconds plus 74 random bitsDatabase keys, logs, anything that benefits from time order
v8Layout defined by the applicationCustom or experimental schemes

Version 4: random

A v4 UUID sets the version and variant bits and fills the other 122 bits with random data. This page uses crypto.randomUUID() where the browser supports it and otherwise builds the UUID from crypto.getRandomValues(). Both draw from the operating system's cryptographically secure generator, never from Math.random().

Version 7: time-ordered

A v7 UUID puts the current Unix time in milliseconds in its first 48 bits, then the version, 12 bits called rand_a, the variant and 62 random bits called rand_b:

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           unix_ts_ms                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          unix_ts_ms           |  ver  |       rand_a          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|var|                        rand_b                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            rand_b                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Because the time comes first, v7 UUIDs sort in creation order as text and as bytes. That matters for databases: inserting random v4 keys scatters writes across a B-tree index, while v7 keys are appended near the end, much like an auto-increment number. When you generate many in the same millisecond, this page follows the RFC's "fixed-length dedicated counter" method: rand_a starts at a random value each millisecond and goes up by one for each extra UUID, so a bulk list is strictly increasing. If the counter would overflow, the timestamp moves forward by one millisecond, as the RFC allows, and if your computer's clock steps backwards the last timestamp is reused so the order never breaks.

Formats: uppercase, no hyphens and braces

The original standard, RFC 4122, says UUIDs are output in lowercase and are case insensitive on input. Some systems want other forms: Microsoft tools and the Windows registry show GUIDs in uppercase in braces, and some databases store the 32 hex digits without hyphens. These options change only how the value is written, not the value itself.

Tips and troubleshooting

Related tools

Working with an API? Check payloads with the JSON formatter, and turn the millisecond time inside a v7 UUID into other formats with the Unix timestamp converter. For renaming identifiers between camelCase and snake_case, try the case converter.

Frequently asked questions

What is the difference between UUID v4 and v7? +

A version 4 UUID is 122 random bits, so values have no order. A version 7 UUID starts with the creation time in milliseconds followed by random bits, so values sort in the order they were made. Both are 128 bits and look the same; v7 is usually the better choice for database primary keys.

Can two UUIDs ever be the same? +

In theory yes, in practice no, as long as they come from a good random source. A v4 UUID has 122 random bits: you would need to generate roughly 2.7 quintillion of them before the chance of a single duplicate reached 50 percent. This page uses your browser's cryptographic random number generator.

Are UUIDs generated here safe to use? +

Yes. They are made in your browser with the Web Crypto API (crypto.randomUUID or crypto.getRandomValues), the same source browsers use for encryption keys. Nothing is sent to a server, so nobody else sees the IDs you generate.

Is a GUID the same as a UUID? +

Yes. GUID (globally unique identifier) is Microsoft's name for the same 128-bit format. Windows tools often show GUIDs in uppercase and wrapped in braces, which you can turn on with the Uppercase and Braces options.

Can I get the creation time from a UUID? +

Only for time-based versions. Version 7 stores Unix time in milliseconds in its first 48 bits, and versions 1 and 6 store a 100-nanosecond count since 15 October 1582. Paste one into the decoder above to see the date. Version 4 UUIDs contain no time at all.

Should I use UUIDs as secret tokens? +

Not as your only protection. A v4 UUID from a secure generator is hard to guess, but RFC 9562 advises against relying on UUIDs as security capabilities, and v7 UUIDs reveal when they were created. For session tokens or password reset links, use a dedicated random token.

Related