RevealTheme logo

UUID Generator

Generate v4 UUIDs (random universally unique identifiers). Each click produces a new one.

How to use this tool

  1. 1

    Click the Generate UUID button to produce a fresh random v4 UUID.

  2. 2

    Read the 36-character identifier shown in the canonical 8-4-4-4-12 format below the button.

  3. 3

    Click Copy to put the UUID on your clipboard for pasting into code, a database, or a config file.

  4. 4

    Click Generate UUID again whenever you need another one — every click replaces the value with a brand-new random UUID.

What is a UUID and why does software use them?

A UUID (Universally Unique Identifier, called GUID in Microsoft contexts) is a 128-bit value used to identify things without coordinating between systems. The point is that two programs on two machines, with no knowledge of each other, can each mint UUIDs and assume they will never collide. That unlocks distributed design: any service can generate IDs locally without a central counter, you can merge databases without renumbering rows, and clients can pre-generate IDs before the server sees the request. RFC 4122 defines several canonical versions — v1 (time + MAC address, which leaks creation time and machine identity), v3 (MD5 hash of a namespace + name), v4 (random), and v5 (SHA-1 hash of a namespace + name) — and RFC 9562 added v6 and v7 (timestamp-prefixed, designed to sort chronologically for database keys). This tool generates v4 only. It calls the browser's built-in crypto.randomUUID(), which draws from the operating system's cryptographically-strong RNG — the same source TLS keys use. The result is a standard v4 UUID in the same RFC format produced by Python's uuid.uuid4(), Node's crypto.randomUUID(), and Go's NewRandom(); the values differ every time (they are random) but are interchangeable in format across all those tools.

Common use cases

  • Database primary keys — drop a v4 UUID in instead of an auto-incrementing integer when you need to merge tables or generate IDs on the client before insert.

  • Session and CSRF tokens — a random 122-bit value is long enough that guessing a valid one is computationally infeasible.

  • Idempotency keys for API requests — attach a UUID so a retried POST is deduplicated by the server instead of charging the customer twice.

  • Uploaded file names — store files under a UUID to avoid path collisions and to keep the user's original filename out of the URL.

  • Distributed tracing and correlation IDs — tag each request with a UUID and propagate it through services so logs can be stitched together.

  • Seeding test fixtures — paste a fresh UUID into a unit test when you need a unique-but-throwaway identifier without hand-picking one.

Frequently asked questions

What UUID version does this tool generate?
Only version 4 (random). crypto.randomUUID() always returns a v4 UUID: 122 bits of randomness plus 6 fixed bits encoding the version and variant. There is no setting here to produce v1, v3, v5, v6, or v7 — if you need those, use a library such as Python's uuid module, Node's uuid package, or Go's google/uuid.
Is my UUID generated privately, or sent to a server?
Entirely private. crypto.randomUUID() runs in your browser using your own machine's RNG. Nothing is uploaded, logged, or sent anywhere — the UUID never leaves your device, and the page works offline once loaded.
How unique are v4 UUIDs really?
Each has 122 effective random bits, about 5.3×10^36 possible values. You would need to generate roughly 2.71 quintillion of them before reaching a 50% chance of any collision. At 1 billion per second that is about 85 years. With a sound RNG, practical collisions do not happen.
Should I use v4 for database primary keys?
It works, but v4 is random, so new rows scatter across a B-tree index and can cause page splits and slower inserts at scale. If that matters, a time-ordered v7 UUID (or a ULID) keeps inserts sequential because the timestamp prefix sorts chronologically. This tool only emits v4, so for v7 reach for a dedicated library.
Is crypto.randomUUID() safe and well-supported?
Yes. It is part of the Web Crypto / WHATWG spec and ships in every current browser, backed by the OS cryptographic RNG (the same source TLS keys come from). Output is unpredictable and uniformly distributed across the v4 space. Note it requires a secure context (HTTPS or localhost).
What is the difference between a UUID and a GUID?
They are the same concept; GUID is Microsoft's name for it. The canonical 8-4-4-4-12 string this tool outputs is identical. Watch out only when reading raw bytes: some Microsoft APIs (.NET's Guid.ToByteArray()) use mixed-endian byte order for the first three fields.
Can I shorten the UUID for a URL?
Yes — the 128 bits can be re-encoded as Base62 (about 22 characters) or url-safe Base64 instead of the 36-character hex form. This tool outputs the standard hex format; converting to a shorter encoding is a separate step. The underlying bits, and therefore the uniqueness, are unchanged.

Related tools