Skip to content
tools.best

Browse all tools

UUID Generator

A fresh UUID is generated the moment the page loads. Choose the version, the number and the format; GUID is Microsoft's name for the same identifier.

Generated in your browser from its cryptographic random source. Nothing is sent to a server. Sources: RFC 9562 Updated

Options
1 to 1,000
Format

Check a UUID or GUID

Paste any UUID to see whether it is well formed, which version and variant it is, and the timestamp stored in a version 1 or version 7 value. Braces, uppercase letters, a urn:uuid: prefix and missing hyphens are accepted.

UUID format: how the 128 bits are laid out

A UUID is 128 bits, written as 32 hexadecimal digits in groups of 8, 4, 4, 4 and 12. Each digit is half a byte, in the same base-16 notation the text to hex converter uses:

xxxxxxxx-xxxx-Vxxx-Nxxx-xxxxxxxxxxxx

V is the version. N is 8, 9, a or b: its top two bits are 1 and 0, which mark the variant of the standard. The other 122 bits depend on the version.

VersionWhat the bits containExample
4122 random bits.f47ac10b-58cc-4372-a567-0e02b2c3d479
748 bits of Unix time in milliseconds, then 74 random bits.017f22e2-79b0-7cc3-98c4-dc0c0c07398f
NilAll 128 bits zero. Stands for "no UUID".00000000-0000-0000-0000-000000000000

The version 7 example is the one from RFC 9562. Its first twelve digits, 017f22e279b0, are the timestamp: 2022-02-22T19:22:22.000Z.

The UUID f47ac10b-58cc-4372-a567-0e02b2c3d479 in five groups of 8, 4, 4, 4 and 12 hex digits, with the version digit 4 and the variant digit a (1010 in binary) marked; the other 122 bits are random.
Every version 4 UUID has a 4 in the same place, and an 8, 9, a or b four places later.

How to build a version 4 UUID from 16 random bytes

  1. The browser supplies 16 random bytes, for example f4 7a c1 0b 58 cc c3 72 25 67 0e 02 b2 c3 d4 79.
  2. The high four bits of byte 7 are replaced by the version, 0100: c3 becomes 43.
  3. The high two bits of byte 9 are replaced by the variant, 10: 25 becomes a5.
  4. The bytes are written in hex with hyphens after bytes 4, 6, 8 and 10: f47ac10b-58cc-4372-a567-0e02b2c3d479.

UUID formats: hyphens, braces and uppercase

FormatLooks likeWhere it is used
Lowercase with hyphensf47ac10b-58cc-4372-a567-0e02b2c3d479The form the standard recommends for output.
UppercaseF47AC10B-58CC-4372-A567-0E02B2C3D479Common in Windows and .NET output.
Braces{F47AC10B-58CC-4372-A567-0E02B2C3D479}The Windows registry format for GUIDs.
No hyphensf47ac10b58cc4372a5670e02b2c3d479Compact 32-character keys and file names.

All four are the same value. Changing the format options rewrites the UUIDs already shown; it does not generate new ones.

Versions 3 and 5, which this page reads but does not make, are built from an MD5 or SHA-1 hash of a name instead of random bytes; the hash generator shows those digests for any text. The other generators on this site make QR codes, schema markup and ASCII art.

UUID Generator: FAQ

What is a UUID and why is it used?
A UUID is a 128-bit identifier that anyone can create without a central registry and still expect no one else to hold. That is its use: a program can name a record, file or message on the spot, without asking a server for the next free number. Databases use UUIDs as primary keys when records are created on several machines at once, and Microsoft Windows uses them, under the name GUID, as a core identifier.
What is the difference between a UUID and a GUID?
None in practice. UUID (universally unique identifier) is the name in the standard, RFC 9562. GUID (globally unique identifier) is the name Microsoft uses for the same 128-bit value. Windows tools often show a GUID in uppercase and in braces; choose those options here to get that format.
Can two generated UUIDs be the same?
In theory yes, in practice no. A version 4 UUID has 122 random bits, which is about 5.3 × 10³⁶ possible values. Generating a billion UUIDs every second, it would take about 86 years to reach an even chance of a single repeat.
Should I use version 4 or version 7?
Version 4 is fully random and the usual choice. Version 7 starts with the time in milliseconds, so values created later sort later. That keeps database indexes compact when the UUID is a primary key. Use version 4 when the creation time should not be visible in the identifier.
Are these UUIDs safe to use as secrets?
They come from crypto.getRandomValues, the browser's cryptographic random generator, so version 4 values are unpredictable. A UUID is still designed as an identifier, not as a password or access token: version 7 exposes its creation time, and identifiers tend to end up in logs and URLs.
Why is there always a 4 in the same place?
The first digit of the third group is the version number: 4 for random, 7 for time-ordered. The first digit of the fourth group is 8, 9, a or b; it marks the variant defined by the standard.
Can you decode a UUID?
Partly. A UUID shows its version and variant in two fixed digits, and a version 1 or version 7 UUID also holds the time it was created. Paste one into Check a UUID or GUID on this page to read all three. A version 4 UUID holds nothing else to decode: apart from the version and variant bits it is random.
Why is no UUID written into the page itself?
A UUID that is part of the page would be the same for every visitor, which defeats its purpose. The page therefore generates one in your browser when it loads.

Sources