πŸ†” Generate unique identifiers
150
Version:V4
Count:1
Type:Random

What a UUID is

A UUID (universally unique identifier), also called a GUID, is a 128-bit value written as 32 hexadecimal digits in five groups, such as 123e4567-e89b-12d3-a456-426614174000. It is designed to be unique without a central authority, which is why databases, APIs and distributed systems use it as an identifier.

Which version to use

Version 4 is random and is what you want almost all of the time: it leaks nothing and needs no coordination. Version 1 combines a timestamp with the machine MAC address, which makes ids roughly sortable but exposes the generating machine, so prefer v4 unless you specifically need time ordering.

Frequently asked questions

What is the difference between UUID v1 and v4?

Version 4 is 122 random bits with no structure. Version 1 embeds a timestamp and the node (usually the MAC address), so v1 values sort by creation time but can leak the machine that made them. Use v4 unless you need time-based ordering.

Can two UUIDs collide?

For version 4 the chance is negligible: you would need to generate about 2.7 x 10^18 of them before a 50 percent chance of one collision. In practice collisions are not a concern.

Is a UUID cryptographically secure?

It depends on the generator. A v4 UUID from a cryptographic source is random, but a UUID is not a secret and should not be used as an API key or a password. Use the password generator for credentials.

What is the Nil UUID?

It is the all-zero UUID, 00000000-0000-0000-0000-000000000000, conventionally used to mean no value. It is never a valid random identifier.

Related tools