JSONToonPro
Utility tool

UUID Generator

Generate one or many version 4 UUIDs (also called GUIDs) using your browser cryptographic random source, with options for uppercase and hyphen removal. Everything runs 100% client-side in your browser.

100% client sideInstant resultNo data sent

How many

0 UUIDs (version 4)

Nil UUID: 00000000-0000-0000-0000-000000000000. Version 4 UUIDs use 122 random bits generated by your browser crypto API, so they never leave this page.

What Is a UUID?

A UUID is a Universally Unique Identifier: a 128-bit value designed so that anyone, anywhere, can mint one without asking a central authority for permission and still be confident nobody else will produce the same value. Written out in the canonical form it is 36 characters long, made of 32 hexadecimal digits split by four hyphens into groups of 8, 4, 4, 4, and 12.

3f2b9c1e-7d4a-4b8e-9f16-2c5a8e0d71b3
8-4-4-4-12  =  32 hex digits + 4 hyphens = 36 characters

Microsoft calls the same structure a GUID (Globally Unique Identifier). The layout, the length, and the guarantees are identical, so a value produced here drops straight into any system expecting either name.

UUID Versions Compared

The specification defines several versions, and they differ in where the bits come from. Some are derived from time, some from hashing a name, and some are simply random. The version digit is stored inside the value itself, so any UUID tells you how it was made.

VersionHow it is builtNotes
v1Timestamp plus the machine MAC addressSortable by time, but it leaks the hardware address and the moment of creation
v2DCE security variant with a POSIX user or group idAlmost never used outside legacy DCE systems
v3MD5 hash of a namespace and a nameDeterministic: the same inputs always give the same UUID
v4122 random bitsThe general purpose default and what this tool generates
v5SHA-1 hash of a namespace and a nameDeterministic like v3 and preferred over it because SHA-1 beats MD5
v7Unix millisecond timestamp followed by random bitsTime ordered and sortable, well suited to database primary keys

Reading the Version and Variant Nibbles

Not every character in a v4 UUID is random. Two positions are reserved. The 13th hexadecimal digit (the first character of the third group) always holds the version number, so in a version 4 value it is literally the character 4. The 17th hexadecimal digit (the first character of the fourth group) holds the variant bits, and for the standard variant it is always one of 8, 9, a, or b.

3f2b9c1e-7d4a-4b8e-9f16-2c5a8e0d71b3
              ^ version = 4
                   ^ variant = 8, 9, a, or b

That is why a version 4 UUID carries 122 random bits rather than the full 128: four bits go to the version and two to the variant. It also gives you a cheap sanity check when validating input, because a value with a 4 in the wrong place is not a well formed v4 UUID.

How Unique Is Unique?

With 122 random bits there are roughly 5.3 times 10 to the power 36 possible v4 values. Applying the birthday bound, you would need to generate on the order of 2.7 times 10 to the power 18 UUIDs before reaching a 50 percent chance of a single collision. That is about 2.7 billion billion identifiers. Generating a million per second, you would be waiting roughly 85,000 years to reach that point.

The honest framing is this: a v4 collision is not impossible, it is simply so unlikely that other failure modes in your system (disk corruption, a bad deploy, a weak random source) are vastly more probable. The one real risk worth guarding against is a broken random source, which is why generating from a cryptographic source rather than a general purpose one matters.

The nil UUID

One value is special: 00000000-0000-0000-0000-000000000000, called the nil UUID. It is reserved as an explicit "no identifier" sentinel. Some systems use it as a default column value, so treat it as a null marker rather than as a real id.

UUIDs vs Auto-Increment Integers as Database Keys

Choosing a primary key type is a real tradeoff rather than a matter of taste. UUIDs win on independence and privacy. Integers win on size and physical ordering.

ConcernUUIDAuto-increment integer
CoordinationNone needed, any client can mint a key offlineRequires the database to hand out the next value
EnumerationCannot guess the next id from one you holdTrivially guessable, exposing record counts and other rows
Storage16 bytes binary, 36 characters as text4 or 8 bytes
Index localityRandom v4 values scatter inserts across the indexNew rows append to the end of the index
Merging datasetsSafe, keys from separate systems will not clashPainful, ranges overlap and need remapping

The index locality problem is the one that bites at scale: because v4 values are random, each insert lands in an unpredictable place in a B-tree index, causing page splits and poor cache behaviour. Version 7 exists precisely to fix this. It puts a millisecond timestamp in the leading bits, so newly generated values sort near each other and inserts stay sequential while keeping the coordination-free property.

How This Generator Works

The tool above produces version 4 UUIDs using the Web Crypto API built into your browser, which draws from the operating system entropy pool rather than a fast pseudorandom function. Nothing is requested from a server and nothing is transmitted, so the identifiers you generate exist only on your device. Common uses include database primary keys, request correlation ids in logs, idempotency keys for payment and retry logic, file and object storage names, and test fixtures that need to stay distinct across runs.

Need a different kind of identifier or a hash instead? Browse the full developer tools collection for hash generators, random number generators, and encoders that pair well with id generation.

Frequently asked questions

4 answers
A UUID (Universally Unique Identifier) is a 128-bit value written as 32 hexadecimal digits in five hyphen-separated groups. Version 4 is the random variant: almost all of its bits come from a random source, with a few fixed bits marking the version and variant. Because version 4 needs no central authority and no coordination, it is the most common way to mint unique ids in application code.

More JSON Tools

About the UUID Generator

Unique identifiers are the glue of distributed systems: they let you create database keys without a central counter, trace a request across services, and deduplicate operations safely. This generator produces version 4 UUIDs, the random variant, drawing its bits from your browser's cryptographic random source so the values are strong enough for production use. Generate a single id or a whole batch at once, switch to uppercase, or strip the hyphens for compact storage. Because everything runs locally in your browser, no id is ever sent to a server, which makes this a fast and private way to mint keys, tokens, and correlation ids.