DevKit Tools

UUID Generator

Generate version 4 UUIDs with the browser's crypto API, in bulk, with uppercase and brace options.

Generators/UUID Generator

Generate RFC 4122 version 4 UUIDs using the browser's crypto API.

About

5 version 4 UUIDs, generated locally with crypto.randomUUID. Bump the Regenerate field for a new batch.

Generating...

What the uuid generator does

A version 4 UUID is 122 random bits. The collision probability is small enough that you can generate identifiers independently on many machines and never coordinate, which is why they are used for distributed systems and client-generated keys.

These come from crypto.randomUUID, the browser's cryptographically secure generator.

The thirteenth character is always 4, marking the version, and the seventeenth is always one of 8, 9, a or b, marking the variant. Those two fixed positions are why a v4 UUID has a recognisable shape, and they are the reason it carries 122 random bits rather than the full 128.

Good to know

  • Case is cosmetic. A UUID is the same value whether its letters are upper or lower case, so compare them case-insensitively and never treat the two forms as different keys.
  • If you need identifiers that sort in creation order, v4 is the wrong tool. Reach for UUID v7 or a ULID, which put a timestamp in the high bits so new rows append to the end of an index.
  • Generating in bulk here is just a convenience for seeding or testing. In production, mint each identifier where the record is created so it maps to exactly one thing.

Using the tool

  1. 1Set how many you need.
  2. 2Choose uppercase or braces if your platform expects them.
  3. 3Change the Regenerate number for a new batch.
  4. 4Copy the list.

Common questions

Can two UUIDs collide?

In theory. In practice you would need to generate billions per second for decades before collision became likely, so it is not a practical concern.

Should I use a UUID as a database primary key?

It works and avoids coordination, but random UUIDs fragment B-tree indexes because inserts land anywhere. UUID v7, which is time-ordered, is a better fit for that.

What does version 4 mean?

That it is generated from random data rather than from a timestamp or MAC address, which earlier versions used.

Why are some UUIDs wrapped in braces?

That is the Microsoft registry and COM convention. The braces are not part of the value, so include them only when the platform you are feeding expects that form.

Is a UUID the same as a GUID?

For practical purposes yes. GUID is Microsoft's name for the same 128-bit identifier; the format and the version 4 random variant are identical.

Try next

More Security tools