UUID Generator

Generate UUID v4 or v7 in bulk and copy them in one click.

Version 4 is 122 random bits. It is the most widely supported and the right default for most uses.

How to generate UUIDs

  1. Choose UUID v4 or v7.
  2. Set how many you need and the format.
  3. Copy the list, or press Generate new for another set.

UUID structure

A UUID has 32 hex digits in five groups (8-4-4-4-12). The first digit of the third group shows the version, and the first digit of the fourth group the variant.

Choosing v4 or v7 for databases

Random v4 keys insert at random places in a B-tree index, which can slow large tables. v7 keys increase over time, so inserts go to the end of the index like an auto-increment, while still being unique across servers.

Generating UUIDs in code

Browsers and Node.js have crypto.randomUUID(). Python has uuid.uuid4(), and PostgreSQL has gen_random_uuid(). Newer libraries and databases also offer v7.

Frequently asked questions

What is a UUID?

A 128-bit universally unique identifier written as 36 characters, like 550e8400-e29b-41d4-a716-446655440000. It lets systems create IDs without a central counter.

Can two UUIDs collide?

In practice, no. With 122 random bits you would need to generate billions per second for decades before a duplicate became likely.

UUID or GUID?

They are the same thing. GUID is Microsoft's name for a UUID.

Are these UUIDs secure?

They come from crypto.randomUUID and the Web Crypto random generator. Still, do not use a UUID as a password or secret token.