Generators

UUID Generator

Generate random version 4 UUIDs (GUIDs).

Rate this tool

How to use the UUID Generator

  1. Choose how many UUIDs you need.
  2. Click Generate.
  3. Copy the result.

About the UUID Generator

A UUID is a 128-bit identifier written as 32 hex digits in five dash-separated groups. This tool produces version 4 UUIDs — the random kind — using your browser’s crypto.randomUUID() where available, falling back to crypto.getRandomValues(). Both use the same cryptographically secure random source and run entirely in the page; nothing is sent to a server. You can request up to 100 at a time.

Six of the 128 bits are fixed to mark the version and variant, leaving 122 random bits. That number is the whole point of the format. It is large enough that a collision between two independently generated v4 UUIDs is treated as negligible in practice — so any number of machines can mint identifiers at once, offline, without asking a central database for the next value. No coordination, no round trip, no single point of failure.

Two honest caveats. A UUID is not a secret — it is designed to be unique, not hidden, and UUIDs are routinely logged and embedded in URLs, so never rely on one alone as a session token; use the password generator for that. And v4 UUIDs make poor clustered primary keys precisely because they are random: inserts land all over the index instead of appending at the end, fragmenting pages and hurting write performance. That trade-off is why time-ordered identifier schemes were later devised.

Frequently asked questions

What is a version 4 UUID?

One generated from random data. Six of its 128 bits are fixed to identify the version and variant, and the remaining 122 bits are random. It is the most common UUID type for general-purpose use.

Could two UUIDs ever come out the same?

In theory yes, but it is not something you plan around. With 122 random bits from a secure generator, the probability is small enough that systems worldwide generate UUIDs independently without any central coordination.

Is a UUID safe to use as a security token?

No. UUIDs are built to be unique, not secret — they are routinely logged, put in URLs and shared. Use a purpose-made random token for anything that grants access.

Are UUID and GUID the same thing?

In practice, yes. GUID is Microsoft terminology for the same 128-bit identifier format.

Should I use a UUID as a database primary key?

It works, but random v4 UUIDs scatter inserts across a clustered index rather than appending in order, which can hurt write performance on large tables. Time-ordered identifier schemes exist specifically to solve that.