UUID Generator

Generate RFC 4122 version 4 UUIDs online, in bulk, using your browser's cryptographic random source. Also validates and identifies existing UUIDs.

All processing happens in your browser. Nothing is uploaded.

Generated with your browser’s cryptographic random source, not Math.random.

Check a UUID

How to use

  1. Set how many you want, up to 100.
  2. Pick a format: standard, uppercase, without dashes, or wrapped in braces.
  3. Click Generate for a fresh batch, or Copy all to take them.
  4. Paste any UUID into the checker at the bottom to validate it and read its version.

About UUIDs

A UUID is a 128-bit identifier designed to be unique without a central authority handing out numbers. That property is the whole point: two systems that have never communicated can each mint identifiers and safely merge their data later, because the chance of a collision is negligible.

Version 4 — the kind generated here — achieves this by being almost entirely random. Six of the 128 bits are spent on the version and variant fields, which is why you see a fixed 4 after the second dash and one of 8, 9, a, b after the third. The remaining 122 bits are pure randomness.

The quality of that randomness is the part worth caring about. Math.random() is a fast pseudo-random generator whose output can be predicted from previous values; using it for session tokens or password reset links is a real vulnerability. crypto.getRandomValues(), which this tool uses, draws from the operating system’s cryptographic entropy pool and is not predictable.

One practical caveat: v4 UUIDs have no ordering. Two generated a second apart sort no closer than two generated years apart, which is exactly what you do not want in a database index that inserts in key order. Version 7 puts a timestamp in the leading bits to restore that locality while keeping the uniqueness guarantee, and is the better default for new schemas with heavy write traffic.

Frequently asked questions

Are these UUIDs actually random and safe to use?

Yes. They come from crypto.getRandomValues, your browser's cryptographically secure random source — not Math.random, which is fast but predictable and unsuitable for identifiers that must not be guessable.

Are they generated on your server?

No, and that matters more than it sounds. A UUID generated on someone else's server is a UUID that someone else has seen. These are generated locally and never transmitted.

What is the chance of a collision?

Version 4 UUIDs carry 122 random bits. You would need to generate roughly 2.7 × 10^18 of them before the probability of a single collision reaches 50%. At a million per second that is about 85,000 years. In practice, collisions are not something you need to design around.

Why do all of them have a 4 in the same position?

That digit is the version field, fixed by the specification. The character after the third dash is the variant field and is always 8, 9, a or b. Those six bits are the reason a v4 UUID has 122 random bits rather than 128.

Should I use a UUID as a database primary key?

It depends on the index. Random v4 UUIDs scatter inserts across a B-tree, which fragments the index and hurts write performance on large tables — a real cost in MySQL with clustered primary keys. Version 7, which begins with a timestamp and therefore sorts roughly by creation time, was designed to fix exactly this. If you control the schema and expect high write volume, look at v7.