UUID Generator
Generate a random UUID v4 or a time-ordered UUID v7 instantly, or up to 10,000 at once. It's an online GUID generator too: a new GUID is the same kind of 128-bit value. Paste any UUID to decode its version, creation time and every field.
The coloured digit is the version: the first digit of the third group in every UUID.
Made and read in your browser with crypto.getRandomValues; nothing is sent.
What is a UUID, and what does UUID stand for?
UUID stands for Universally Unique Identifier: a 128-bit label that any computer can make on its own and still expect no other computer to make the same one. It is written as 32 hexadecimal digits in five groups, such as 919108f7-52d1-4320-9bac-f847db4148a8.
The format is defined by RFC 9562 (May 2024), which replaced RFC 4122 and added versions 6, 7 and 8. No central registry hands UUIDs out: uniqueness comes from randomness, from a timestamp, or from hashing a name, depending on the version.
Databases use them as primary keys, APIs as request and object IDs, operating systems for disks, partitions and software components. A GUID (Globally Unique Identifier) is Microsoft's name for the same thing.
UniversallyUniqueIDentifier
- 128 bits
- 16 bytes
- 32 hex digits
- 36 characters with the hyphens
919108f7-52d1-4320-9bac-f847db4148a8
GUIDMicrosoft's name for the same value

Pick a versionRandom v4, time-ordered v7, name-based v5 and the rest, each with its own colour.One clickCopy it, or make a new one; a batch of up to 10,000 goes out as text, CSV, JSON or SQL.Every fieldThe bits RFC 9562 defines for this version, with the time a v7 carries read out.Any formatBraces, no hyphens, upper case, Base64url, an integer or the .NET byte order.UUID format and length: 36 characters
A UUID is 128 bits, written as 32 hex digits and 4 hyphens in groups of 8, 4, 4, 4 and 12: 36 characters. The first digit of the third group is the version, and the first digit of the fourth group shows the variant: 8, 9, a or b for RFC 9562 UUIDs.
So 017f22e2-79b0-7cc3-98c4-dc0c0c07398f is version 7, RFC variant. Upper, lower and mixed case are all valid; most tools print lower case, macOS uuidgen upper case. Without hyphens it is 32 characters, in braces 38 (.NET's B format), as urn:uuid: 45, and in Base64url 22.
A UUID regex that checks the RFC form: ^[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 case-insensitive flag. It refuses the Nil and Max UUIDs, which are valid but special; the decoder above names them.
32 hex digits + 4 hyphens = 36 characters
xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxxM version: 1–8N variant: 8, 9, a or b^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$- Standard36
- No hyphens32
- Braces {…}38
- urn:uuid:45
- Base64url22
- Base6424
- Base5821
- Base3226
- Integerup to 39
- Binary16 bytes
UUID versions explained: v1 to v8
The version says how a UUID was made: v4 from random bits, v7 from the time plus random bits, v1 and v6 from a timestamp and a node ID, v3 and v5 by hashing a name, and v8 in a layout of the maker's own.
Versions 2 and 0 aren't generated here: v2 (DCE Security) is reserved and RFC 9562 doesn't define its layout, and 0 isn't a version. The two special values have no version: the Nil UUID is all zeros and the Max UUID all ones (ffffffff-ffff-ffff-ffff-ffffffffffff, new in RFC 9562).
For new systems RFC 9562 recommends v7 over v1 and v6, and v5 over v3. v4 stays the plain choice when the value should say nothing about when it was made.
- time
- random
- hash
- clock sequence
- node
- version
- variant
UUID v4 vs v7: which should you use?
Use v7 for database keys and anything you sort or index: it starts with the creation time, so new rows land at the end of the index. Use v4 when the ID must not reveal when it was made: all 122 of its free bits are random.
Random v4 keys scatter every insert across a B-tree index, which splits pages and keeps more of the index hot in memory; v7 keys arrive in order like an auto-increment number, yet any server can make them without asking a database. A v7 keeps 74 random bits per millisecond, so two servers making one at the same moment still don't collide.
The trade-off: anyone who sees a v7 can read the millisecond it was made (paste one in the decoder above). If that matters, use v4, or keep v7 internal and show a different ID publicly.
c100eb4b-4f3f-4b29-ad77-da7cd9d1eda592c97333-2db8-4fc2-b5b6-cedd8c7abede01a16d3e-e1c0-70f6-99ec-6d454991b2fa01a16d3e-e1c0-70f6-99ec-6d45c2f6b35b- already in the index
- free
- new v4
- new v7
- page split: half its keys move to a new page
GUID vs UUID: is there a difference?
A GUID and a UUID are the same 128-bit value in the same text form; GUID is Microsoft's name for it. Guid.NewGuid() in .NET makes a random version 4 UUID, and .NET 9's Guid.CreateVersion7() a version 7.
The difference is in memory. Microsoft's GUID structure stores its first three groups as little-endian integers, so .NET's ToByteArray() gives the first 8 bytes in a different order than RFC 9562's network byte order: 919108f7-52d1-… becomes the bytes f7 08 91 91 d1 52 …. The text is the same; raw bytes moved between systems need converting. The decoder shows both orders.
SQL Server's uniqueidentifier also sorts by its last six bytes first, so v7 values don't stay in time order there; NEWSEQUENTIALID() makes values that do, though they can start lower again after a restart and are easy to guess. Old COM GUIDs can carry Microsoft's own variant bits instead of RFC 9562's; the decoder names that variant.
919108f7-52d1-4320-9bac-f847db4148a8- Data1 · 4 bytes, reversed
- Data2 · reversed
- Data3 · reversed
- Data4 · as is
How to generate a UUID in code
Most languages make a v4 UUID in one line, and many now make v7 too: Python 3.14's uuid.uuid7(), .NET 9's Guid.CreateVersion7(), Java 26's UUID.ofEpochMillis(), Go 1.27's uuid.NewV7(), Node.js 26.1's crypto.randomUUIDv7() and PostgreSQL 18's uuidv7(). Browsers still have only crypto.randomUUID(), a v4.
Pick your language for the one-liner. Not every v7 keeps UUIDs made in the same millisecond in order: Python's and Go's do, .NET's and Node's don't promise it. And MySQL's UUID() returns a version 1 UUID, which on Linux and Windows carries the server's real MAC address.
Built-in UUID functions, per language
import uuid
uuid.uuid4() # v4
uuid.uuid7() # v7, Python 3.14+
uuid.uuid5(uuid.NAMESPACE_DNS, "www.example.com") # v5
uuid7() keeps a 42-bit counter, so UUIDs from one millisecond stay in order.
Can two UUIDs be the same?
In theory yes, in practice no: a v4 UUID has 122 random bits, about 5.3 × 10³⁶ values. You would need to make about 103 trillion of them for a one-in-a-billion chance that any two match, and about 2.7 quintillion for even odds.
That is the birthday bound: with n random values out of N, the chance of a repeat is about 1 − e^(−n(n−1)/2N). Making a billion UUIDs a second, a 50% chance would take about 86 years. Real duplicates come from broken generators: a non-random seed, a virtual machine cloned with its random state, or IDs copied by hand.
For v7, only UUIDs made in the same millisecond can match, and 74 random bits tell those apart. The generator here also keeps a batch in order inside one millisecond (RFC 9562 §6.2), so 10,000 at once are unique and sorted.
At a billion a second, making that many takes 1 second.
UUID decoder: how to read a UUID's timestamp
Paste a UUID into Decode & validate, the UUID decoder and validator above: it reads the version and variant from two fixed places, then the fields that version defines. A v7 gives the millisecond it was made, a v1 or v6 the time to 100 nanoseconds plus a clock sequence and a node ID.
A v1 or v6 node with the multicast bit clear may be the network card's real MAC address; look its maker up in the MAC address lookup. Generators that respect privacy set that bit and use a random node, as this one does.
The time is what the generator wrote, not proof of when the UUID was made. v4 holds no time, only random bits, and v3, v5 and v8 hold hashes: there's nothing to read back, and a hash can't be reversed to the name. Paste a list to check up to 1,000 at once: invalid lines, duplicates and whether time-based UUIDs are in order.
017f22e2-79b0-7cc3-98c4-dc0c0c07398f- unix_ts_ms
0x017f22e279b0 - ms since 1970
1 645 557 742 000 - UTC
2022-02-22T19:22:22.000Z
c232ab00-9414-11ec-b3c8-9f6bdeced846- time_high · time_mid · time_low
1ec 9414 c232ab00 - 100-ns steps since 1582-10-15
138 648 505 420 000 000 - UTC
2022-02-22T19:22:22.0000000Z
The same moment: RFC 9562's examples were made together.
Name-based UUIDs: v5 and v3
A v5 UUID is the SHA-1 hash of a namespace UUID plus a name, cut to 128 bits with the version and variant set; v3 does the same with MD5. The same namespace and name always give the same UUID, on any computer: pick v5 above to use this page as a UUID v5 generator.
RFC 9562 defines four namespaces: DNS for domain names, URL, OID and X.500. So www.example.com in the DNS namespace is always 2ed6657d-e927-568b-95e1-2665a8aea6a2 as v5. Use name-based UUIDs to give a stable ID to something that already has a unique name, without storing a mapping.
Choose v5 over v3: MD5 is weaker, and RFC 9562 recommends v5. Neither is a way to hide the name: anyone who can guess it can compute the same UUID. The v8 option here uses SHA-256 the same way, as in the RFC's own v8 example.
- Namespace
6ba7b810-9dad-11d1-80b4-00c04fd430c8DNS · 16 bytes - Name
"www.example.com"UTF-8 · 15 bytes - SHA-1 digest, 160 bits
2ed6657de927468b55e12665a8aea6a22dee3e35the first 128 bits are kept - The UUID
2ed6657d-e927-568b-95e1-2665a8aea6a2version digit 4 → 5 · variant digit 5 → 9
- DNS
6ba7b810… - URL
6ba7b811… - OID
6ba7b812… - X.500
6ba7b814…
ULID vs UUID v7 (and other IDs)
A ULID and a UUID v7 both start with a 48-bit millisecond timestamp and sort by time. The difference: a ULID uses all its other 80 bits for randomness and is written as 26 Base32 characters, while a v7 spends 6 bits on its version and variant and fits every UUID column and library.
If your database, ORM or API already speaks UUID, v7 gives you time order without a new type. NanoID and similar short IDs are random strings of a chosen length, with no time and no standard layout. Any UUID can also be written shorter: 22 characters in Base64url, at most 22 in Base58.
- milliseconds since 1970
- random
- version and variant
Are UUIDs secure to use as tokens?
No. RFC 9562 says not to assume UUIDs are hard to guess, and never to use one as a security capability: an ID whose possession grants access, such as a password reset link or an API key.
A v4 from a good generator is random, but a v1, v6 or v7 reveals its creation time and a v3 or v5 can be recomputed from its name. For secrets, use a token made for it, such as 256 random bits from a cryptographic generator, and check permission on every request. UUIDs are fine as public IDs when access is checked separately.
UUID generator: questions and answers
How do I generate a UUID?
crypto.randomUUID() in JavaScript, uuid.uuid4() in Python and Guid.NewGuid() in C# each make a v4 in one line.What does UUID stand for?
Is a GUID the same as a UUID?
Which UUID version should I use?
Can two UUIDs ever be the same?
Can you decode a UUID?
How long is a UUID?
What is an empty GUID or Nil UUID?
Is UUID v7 sortable?
Is it safe to use a UUID as a password or access token?
Are the UUIDs made here sent anywhere?
Missing something?Suggest a feature or a new tool
Related tools
Password Generator
Strong random passwords, passphrases and PINs made in your browser, each with its exact bits and crack time
MAC Address Lookup
Identify device vendor from MAC address using IEEE database
Subnet Calculator
Network, broadcast, usable hosts and masks for any IPv4 or IPv6 block, plus VLSM, splits and cloud subnets
Invisible Character
Copy and paste an invisible character or blank space, and find or remove hidden characters in text