UUID Generator

Generate random version 4 UUIDs (also called GUIDs) for database IDs, test data or file names.

Result

How to use

  1. Choose how many UUIDs you need.
  2. Choose uppercase or no hyphens if your system needs it.
  3. Click Copy to copy them all, one per line.

How it works

Each UUID is created with crypto.randomUUID(), which uses 122 random bits. The chance of two ever being the same is so small that it can be ignored in practice.

Tips and common uses

Test data and IDs

Generate a batch of UUIDs for test records, API examples, file names or temporary identifiers. The "Remove hyphens" option gives a 32-character string that is easy to use in file names.

Case and format

UUIDs are case-insensitive, but some systems store them in lowercase and others in uppercase. Match what your database or API already uses, so comparisons do not fail.

Random IDs and databases

Random version 4 UUIDs are great for uniqueness across systems, but as a primary key they can make some database indexes grow less neatly than a sequential number.

Frequently asked questions

What is the difference between UUID and GUID?

They are the same thing. GUID is the name Microsoft uses.

Are these UUIDs unique?

Version 4 UUIDs are random, and collisions are practically impossible.

How do I generate a random UUID in code?

JavaScript: crypto.randomUUID(). Python: import uuid; str(uuid.uuid4()). Java: UUID.randomUUID().toString(). PostgreSQL: gen_random_uuid(). SQL Server: NEWID(). Use this page when you just need a few quickly.

What does the "4" in the UUID mean?

The first digit of the third group shows the version. Version 4 means the UUID was made from random numbers.

More tools