Developer Tools calculator

Free UUID v4 generator

Generate random version-4 UUIDs (RFC 4122 / RFC 9562) — cryptographically random 128-bit identifiers in the standard 36-character format — right in your browser, as many as 50 at a time, with a fresh batch on every click.

InputsLive
Tool
Result
UUID
Enter input above to get started.

Output is generated client-side in your browser. No data is transmitted to any server.

Results are estimates. Consult a professional.

What it does

What this UUID generator does

This UUID generator creates random UUIDs — universally unique identifiers — in your browser, one click at a time. Set how many you want (1 to 50), and the tool produces that many fresh IDs in the standard 36-character form, ready to copy into your code, database or config. Hit Regenerate for a brand-new batch. Each one is a version 4 UUID: 128 bits with 122 of them drawn at random, the kind almost every system reaches for when it needs an identifier that nothing else will ever share.

A UUID lets two computers that have never spoken pick an ID for the same thing — a row, a request, a file — and be confident they will not collide. There is no central counter handing out numbers, no "next ID" to ask a server for. Each machine generates its own, and the maths makes a clash so unlikely it is treated as impossible. That is why UUIDs power distributed databases, message queues, and APIs the world over.

Unique, not secret
A UUID guarantees uniqueness, not secrecy. v4 is random and hard to guess, but UUIDs routinely end up in URLs, logs and emails — treat them as public identifiers, not as passwords or access tokens.
The format

UUID format: the 8-4-4-4-12 structure

Every UUID is a 128-bit number, written as 32 hexadecimal digits split into five groups by hyphens: 8-4-4-4-12. That comes to 36 characters in all — 32 hex digits plus 4 hyphens. The hex is lowercase by convention, and two specific positions are not random at all: they encode the version and the variant, which tell any reader how the UUID was made.

xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
x = a random hexadecimal digit (0-9, a-f)
M = version → 4 for the UUIDs this tool makes
N = variant → 8, 9, a or b for an RFC 4122 UUID
The 8-4-4-4-12 layout and the version/variant bit positions are defined in RFC 4122 (A Universally Unique IDentifier URN Namespace), updated by RFC 9562, which is the current UUID specification.
Example

A worked example: reading a v4 UUID

Example: 3f2504e0-4f89-41d3-9a0c-0305e82c3301

Because v4 is random, this generator never produces the same UUID twice, so we cannot pin a fixed output the way an arithmetic calculator can. Instead, here is a sample valid v4 UUID — the same shape every result takes — annotated group by group.

The five groups

Split on the hyphens: 3f2504e0 · 4f89 · 41d3 · 9a0c · 0305e82c3301. That is 8 + 4 + 4 + 4 + 12 = 32 hex digits, 36 characters with the hyphens — exactly the form above.

The version nibble (M)

The third group is 41d3, and its first digit is 4. That marks this as a version 4 (random) UUID. If you ever see a 1 there it is time-based, a 7 means time-ordered, and so on.

The variant nibble (N)

The fourth group is 9a0c, and its first digit is 9 — one of 8, 9, a or b. That marks the RFC 4122 variant, the layout used by virtually every UUID you will meet. Every other x in the string is a random hex digit.

M = 4, N = 9 → a valid random UUID
Those two fixed nibbles cost 6 of the 128 bits, which is why v4 carries 122 random bits rather than 128. Every UUID this tool emits has a 4 in the M slot and an 8, 9, a or b in the N slot — the rest is pure randomness.
Versions

UUID versions: v1, v4, v5 and v7 compared

The version nibble names how a UUID was generated, and the choices have real trade-offs. Version 4 is the everyday default — pure randomness, no inputs, nothing leaked — and it is what this generator produces. The others exist for specific needs: embedding a timestamp, deriving an ID from a name, or getting database-friendly ordering.

VersionHow it's madeSortable?Best for
v1Timestamp + node (MAC address) + clock sequenceRoughly, by timeLegacy systems; leaks time and hardware address
v4122 random bits from a CSPRNGNoGeneral-purpose IDs, unguessable tokens-of-identity — the common choice
v5SHA-1 hash of a namespace + a nameNoDeterministic IDs: same name always yields the same UUID
v7Unix-millisecond timestamp + random bitsYes, by creation timeDatabase primary keys; time-ordered and index-friendly

Versions per RFC 4122 (v1, v4, v5) and RFC 9562 (which adds the time-ordered v7). v2 and v3 exist but are rare in practice; v3 is the MD5 sibling of the SHA-1-based v5.

v4 for randomness, v7 for sortable keys
If you need IDs that sort by when they were created — better for B-tree index locality in a database — v7 is the modern pick. If you just need an identifier nothing else will share, v4 (this tool) is the simple, safe default.
RFC 9562 (Universally Unique IDentifiers) obsoletes RFC 4122, keeps v1-v5, and adds the time-ordered v6/v7 and custom v8. It is the current IETF specification for UUIDs.
Uniqueness

Why UUID collisions are astronomically unlikely

A version-4 UUID has 122 random bits, which is 2¹²² possible values — about 5.3 × 10³⁶, or 5.3 undecillion. That space is so vast that two independently generated v4 UUIDs colliding is, for any realistic workload, something you can safely ignore.

The honest way to think about it is the birthday problem: how many UUIDs would you have to generate before there is even a 50% chance of a single collision? The answer is roughly 2.7 × 10¹⁸ — about 2.7 billion billion. To put that in perspective, generating a billion v4 UUIDs every second, it would take about 85 years just to reach that fifty-fifty mark. Stay well under it — say 103 trillion UUIDs — and the chance of even a single duplicate is around one in a billion.

~2.7 × 10¹⁸ before a 50/50 collision
This is why systems treat v4 UUIDs as "unique enough to never check." The randomness must come from a good source, though — that is exactly why this tool uses the browser's cryptographic RNG rather than a fast, predictable one.
RFC 9562 §6.8 (Global and Local Uniqueness) states that "a shared knowledge scheme is not required by a UUID to provide uniqueness for practical implementation purposes" — the random bits do the work instead.
Use cases

What developers use UUIDs for

UUIDs show up wherever something needs an identifier that can be generated anywhere, by anyone, without coordination. A few patterns cover most real uses.

  • Database primary keys. Generate the ID in your application before the row is inserted, so you never have to round-trip to the database for an auto-increment value — handy across shards and replicas. (For high-write tables, see the v7 note below on index locality.)
  • Distributed and offline IDs. Mobile apps, multiple services and offline clients can each mint IDs independently and merge them later with no clashes — there is no central sequence to bottleneck on.
  • Idempotency keys. Attach a UUID to an API request so the server can recognise a retry and avoid charging a card or creating an order twice.
  • Correlation and trace IDs. Tag a request with a UUID and follow it through logs across every service it touches.
  • File and object names. Name uploads or temp files with a UUID to avoid overwrites and to keep names unguessable.
The primary-key trade-off
Random v4 UUIDs as primary keys hurt B-tree index locality compared with sequential integers, because new rows land in random positions. If write throughput matters, a time-ordered v7 UUID (or a ULID) keeps the global-uniqueness benefit while inserting in order.
Gotchas

UUID gotchas and common mistakes

UUIDs are simple to use and easy to misuse. Three mistakes account for most of the trouble.

  • Do not treat a UUID as a security token. Uniqueness is not secrecy. UUIDs are designed to be shared — they sit in URLs, logs and emails — and a v1 UUID even reveals the time and MAC address of the machine that made it. For anything that grants access, use a purpose-built secret from a password generator, not a UUID.
  • v4 is not sortable. Because the bits are random, sorting v4 UUIDs gives a meaningless order, and using them as a clustered key scatters inserts across the index. If you need creation order, reach for v7.
  • Mind the format. UUIDs are case-insensitive and the hyphens are presentation, not data — 3F2504E0-4F89-41D3-9A0C-0305E82C3301 and the 32 hex digits with no dashes represent the same value. Normalise to one form (lowercase, hyphenated) before comparing or storing as a string, or store the 16 raw bytes.
UUID vs GUID
"GUID" (globally unique identifier) is Microsoft's name for the same 128-bit UUID. They are interchangeable; .NET and SQL Server say GUID, the IETF and most other ecosystems say UUID. One historical wrinkle: some Microsoft tooling has rendered the first three groups in a different byte order, so double-check before mixing GUIDs and UUIDs across platforms.
Privacy

Is this UUID generator safe to use?

Yes. Every UUID is generated locally in your browser with the Web Crypto API (crypto.randomUUID()). Nothing is sent to a server, logged, or stored — there is no network request, because the randomness comes from your own device. The values you see are yours alone, and the page works the same offline.

Generating them client-side also means the randomness is cryptographic, not the predictable kind a fast pseudo-random generator would give — important, since the whole uniqueness guarantee rests on a good random source. For other client-side identifiers and secrets, see the password generator, and for hashing inputs into fixed-length digests, the hash generator.

Definitions

UUID generator definitions

A 128-bit value written as 32 hex digits in an 8-4-4-4-12 pattern (36 characters with hyphens). Designed so that independently generated IDs effectively never collide. Microsoft calls the same thing a GUID.
The first hex digit of the third group, which records how a UUID was generated: 1 = time-based, 4 = random, 5 = SHA-1 name-based, 7 = time-ordered. This tool always produces version 4.
The first hex digit of the fourth group, which records the UUID layout. For the standard RFC 4122 variant it is 8, 9, a or b. Together the version and variant nibbles occupy 6 of the 128 bits.
A UUID whose 122 non-fixed bits come from a cryptographic random source. The common, general-purpose choice — unguessable and coordination-free, but not sortable.
A UUID that begins with a Unix-millisecond timestamp and fills the rest with random bits (RFC 9562). Sortable by creation time, which makes it friendlier as a database primary key than v4.
The IETF specifications that define UUIDs. RFC 4122 set the original format and versions 1-5; RFC 9562 (2024) obsoletes it and adds the time-ordered v6/v7 and the custom v8.
Questions

Frequently asked questions about the free UUID v4 generator

An UUID generator calculator is a free online tool that helps you generate random UUIDs (v4) — cryptographically random 128-bit identifiers. UUID v4 uses 122 bits of randomness (6 bits reserved for version/variant) for a vanishingly small collision probability. It runs entirely in your browser with instant results and no sign-up.
Negligible. To have a 50% chance of one collision, you'd need ~2.7 × 10¹⁸ UUIDs. For practical purposes, UUID v4s never collide.
v4 is purely random — good for unguessability. v7 prepends a timestamp — sortable, better DB index locality. For new systems, v7 is often preferred; this generator emits v4.
Yes, but they hurt B-tree index locality compared to integers. For high-write tables, consider ULIDs or UUIDv7 instead — same uniqueness, better cache behavior.
About

About this UUID generator

This UUID generator runs entirely in your browser. Each identifier is a version-4 UUID built locally with the Web Crypto API (crypto.randomUUID) — 128 bits with 122 of them cryptographically random — so nothing is sent to a server, logged, or stored, and the tool works the same offline. Set how many you need (1 to 50) and hit Regenerate for a fresh batch.

Looking for more developer utilities? Browse the rest of our dev tools, or see the full library on the all calculators page.

Want a calculator built for your business?

Customize any of our 400+ tools to match your brand, or commission a new one tailored to how your business actually calculates — pricing, payroll, quotes, anything. Deployed on your domain, math runs in your visitors' browsers.