What Is a UUID? Versions, Format and When to Use One

A UUID is an identifier you can create anywhere, without asking a central server, and still trust to be unique.

๐Ÿ†”Free UUID Generator
Random version 4 UUIDs / GUIDs in bulk.
Open tool →

The format

32 hexadecimal digits in five groups: 8-4-4-4-12, for example 3f2b8c1e-9a4d-4e7b-8c2f-1d5a6b7c8d9e. The first digit of the third group is the version.

Versions

Version 4 is random and the most common. Version 1 is based on time and the machine's network address. Version 7 is time-ordered, which makes it friendlier to database indexes.

Will two ever match?

A v4 UUID has 122 random bits. You would need to generate about a billion per second for decades to expect a single collision.

When to use them

For IDs created on many devices or services at once, for public identifiers you don't want to be guessable, and for merging data from different systems. For a small single-database app, an auto-increment number is simpler.

Frequently asked questions

UUID or GUID?

Same thing – GUID is Microsoft's term.

Are UUIDs secret?

No. v4 is hard to guess, but don't use one as a password or token.

How do I make one?

Use the UUID Generator, or crypto.randomUUID() in JavaScript.

๐Ÿ†”Free UUID Generator
Random version 4 UUIDs / GUIDs in bulk.
Open tool →

More guides