Devbelt

UUID v4 Generator

Random UUIDs, generated instantly in your browser

How many(up to 1000)
GENERATED
Click Generate.
INSPECT ANY UUID

Paste a UUID above, or generate one on the left, to see what's inside it.

Every UUID is generated and decoded in your browser using Web Crypto. Nothing is ever uploaded or stored on a server.

About

Most of the time when someone says "generate a UUID," this is what they mean. Version 4 is 122 random bits with a handful of fixed bits marking it as a UUID and nothing else, no clock, no machine identifier, nothing that could tie it back to when or where it was made. Generate one, or a thousand, then paste any UUID into the inspector on the right, generated here or not, to see exactly what version it is and what's encoded inside it.

What a Version 4 UUID actually is

A UUID is 128 bits, almost always written as 32 hex characters split into five groups. In a v4 UUID, 6 of those bits are fixed (4 mark the version, 2 mark the variant), which leaves 122 bits of pure randomness. Nothing else about it means anything. It doesn't encode a timestamp, a location, or a sequence, which is exactly why it works well as an opaque identifier: nobody can look at one and infer when or where it was created.

  xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
              ↑    ↑
          version  variant (8, 9, a, or b)

How random is random enough?

122 random bits gives about 5.3 × 10³⁶ possible values. To put that in perspective, you could generate a billion UUIDs a second for the rest of the universe's lifespan and still be nowhere near a 50% chance of a collision. The number that actually matters isn't the bit count though, it's the randomness source. This tool uses crypto.getRandomValues, the browser's cryptographically secure random number generator, not Math.random, which was never designed to be unpredictable and shouldn't be trusted for anything you need to be unique or unguessable.

When to reach for something else

v4 is the right default for most things, users, orders, sessions, test data, but it isn't the only option, and being honest about that is more useful than pretending one version fits everything:

  • Need IDs that sort by creation time, for a database primary key or an event log? Version 7 encodes a timestamp and stays sortable.
  • Need the same input to always produce the same ID, so you can deduplicate without a lookup? Version 5 is deterministic, built from a namespace and a name.
  • Working with an older system that specifically expects the original timestamp-and-node format? That's Version 1.

Frequently asked questions

What is a UUID v4 used for?
Version 4 UUIDs are the general-purpose default: database primary keys, API resource IDs, session tokens, test fixtures, anywhere you need a unique identifier with no meaning baked into it. If you're not sure which version to use, v4 is almost always the safe choice.
Are these UUIDs cryptographically secure?
Yes. Every UUID here is generated with crypto.getRandomValues, the browser's cryptographically secure random number generator, not Math.random.
Can I generate more than one UUID at a time?
Yes. Set the count next to Generate to anything up to 1,000, and Devbelt generates that many at once, ready to copy as plain lines or as a JSON array, a JS array, a Python list, or a SQL VALUES block.
What's the difference between a UUID and a GUID?
In practice, none. GUID is the term Microsoft's tooling uses; UUID is the term the RFC standards use. A v4 UUID is fully compatible with anything expecting a GUID.
Is my data uploaded anywhere?
No. UUID generation and the inspector both run entirely in your browser via the Web Crypto API. Nothing is ever sent to or stored on a server.

Related tools