UUID Generator
Generate UUID v4, UUID v7 and ULIDs in bulk, and decode any UUID you paste
Generated IDs
Validate and decode
Accepts hyphenated or plain hex, braces and urn:uuid: prefixes, and 26-character ULIDs. Checked as you type.
Decoded
About UUIDs and ULIDs
A UUID (universally unique identifier, which Microsoft calls a GUID) is a 128-bit number written as 32 hexadecimal digits in five groups, such as f47ac10b-58cc-4372-a567-0e02b2c3d479. Any computer can create one without asking a central authority, and the chance of two ever colliding is so small that databases, message queues, file formats and APIs treat them as unique. The current standard is RFC 9562 (May 2024), which replaced RFC 4122 and added versions 6, 7 and 8.
Two small fields say what kind of UUID it is. The version is the first digit of the third group (the 4 in 4372), and the variant is held in the top bits of the fourth group: for every standard UUID that digit is 8, 9, a or b.
Which one should I use?
- UUID v4 is 122 random bits. It reveals nothing about when or where it was made, which makes it the safe default for anything a user might see. Generated here with
crypto.randomUUID(), or withcrypto.getRandomValues()in older browsers; both use the operating system's cryptographically secure random generator. - UUID v7 starts with a 48-bit Unix timestamp in milliseconds, followed by 74 random bits. Because newer IDs sort after older ones, they are far kinder to database indexes than v4: new rows are appended at the end of a B-tree instead of landing on random pages. Use v7 for primary keys. Within one millisecond this tool increments the random part (the monotonic method in RFC 9562 section 6.2), so a bulk list is strictly in order.
- ULID (Universally Unique Lexicographically Sortable Identifier) has the same layout idea, a 48-bit millisecond time and 80 random bits, but is written as 26 characters of Crockford base32, such as
01ARZ3NDEKTSV4RRFFQ69G5FAV. It is shorter, URL-safe, case-insensitive and avoids the easily confused letters I, L, O and U. It is not an RFC standard, but is widely supported.
How to use the generator
- Pick a type and how many you need, from 1 to 1,000. A fresh list is generated whenever you change either.
- Tick Upper case, No hyphens or Braces to match the format your system expects. The list is reformatted rather than regenerated, so the values stay the same.
- Copy the whole list, one per line, or just the first ID.
Validating and decoding
Paste any UUID or ULID into Validate and decode. The tool normalises it, checks its length and characters, and reports the version and variant. For time-based UUIDs it decodes the timestamp: version 1 and version 6 count 100-nanosecond intervals since 15 October 1582 (the start of the Gregorian calendar), while version 7 and ULIDs hold milliseconds since 1970. For version 1 it also shows the clock sequence and node, and whether the node looks like a real network card address, which can identify the machine that made the UUID.
Worked example: 017f22e2-79b0-7cc3-98c4-dc0c0c07398f, the sample in RFC 9562 Appendix A.6, has 7 as its version digit and 9 as its variant digit, so it is a standard version 7 UUID. Its first twelve hex digits, 017f22e279b0, equal 1,645,557,742,000 milliseconds, which is 19:22:22 UTC on Tuesday 22 February 2022. The v1 and v6 examples encode that same moment the older way.
Limitations
- Version 3 and 5 UUIDs are hashes of a name and namespace; the original name cannot be recovered, so only the version is reported. Version 8 is free-form and only its version and variant are shown.
- A v7 UUID or ULID reveals when it was created, to the millisecond. Do not use them where that is sensitive, such as invitation or password-reset tokens, and never use any UUID as a secret: use a dedicated random token instead.
- The timestamps come from your device's clock. If it is wrong, so are the IDs.
Privacy
Every ID is generated in your browser using its cryptographic random number generator. Nothing is sent to a server, logged or stored, and the values you validate never leave the page.
Common questions
What is the difference between a UUID and a GUID?
A UUID and a GUID are the same thing: GUID is the name Microsoft uses for a UUID. Both are 128-bit identifiers written as 32 hexadecimal digits in five groups separated by hyphens. Microsoft software sometimes shows them in upper case or inside braces, but the value underneath is the same and follows the same standard, RFC 9562.
Can two UUIDs ever be the same?
Two UUIDs can in theory be the same, but for random version 4 UUIDs the chance is negligible. A version 4 UUID has 122 random bits, so there are 2 to the power of 122 possible values. Around 2.7 billion billion would have to be generated before there was a 50% chance of one duplicate, provided the generator uses a good random source.
What is the difference between UUID v4 and UUID v7?
UUID v4 is entirely random, while UUID v7 begins with a timestamp. A v4 UUID has 122 random bits and reveals nothing about when it was made. A v7 UUID starts with a 48-bit Unix time in milliseconds followed by 74 random bits, so newer IDs sort after older ones, which suits database primary keys but discloses the creation time.
How long is a UUID?
A UUID is 36 characters long in its standard form: 32 hexadecimal digits and four hyphens, in groups of 8, 4, 4, 4 and 12. Without the hyphens it is 32 characters, and the value itself is 128 bits, or 16 bytes. A ULID holds the same number of bits in 26 characters of Crockford base32.