UUID generator

Random UUID v4 and time-ordered UUID v7 identifiers, singly or a thousand at a time, generated with your browser’s crypto API.

…
Version
Format

Anatomy of a UUID

A UUID is 128 bits written as 32 hex digits in five groups: 8-4-4-4-12. The first digit of the third group is the version (4 or 7). The first digit of the fourth group is the variant, which is 8, 9, a or b for standard RFC 9562 UUIDs.

VersionBuilt fromSortableUse it for
v4122 random bitsNoGeneral-purpose IDs where order doesn’t matter
v748-bit ms timestamp + 74 random bitsYes, by creation timeDatabase primary keys, event and log IDs
v1 / v6Timestamp + node (MAC) IDv6 onlyLegacy systems; can leak the host’s MAC address

Need a secret rather than an identifier? Use the API key generator or the random string generator.

Questions people ask

What is the difference between UUID v4 and v7?

UUID v4 is 122 random bits. UUID v7, defined in RFC 9562 (2024), starts with a 48-bit Unix timestamp in milliseconds followed by random bits, so v7 IDs sort by creation time. That makes v7 friendlier for database primary keys, where random v4 values fragment B-tree indexes.

Can two UUIDs collide?

In practice, no. With 122 random bits in v4, you would need to generate about 2.7 × 10^18 UUIDs for a 50% chance of a single duplicate. v7 adds a timestamp, so collisions can only happen between IDs made in the same millisecond.

Are UUIDs secure enough to use as secret tokens?

A v4 UUID from a CSPRNG is hard to guess, but UUIDs are designed as identifiers, not secrets, and v7 reveals when it was created. For password-reset links or API keys, use a dedicated random token of 128 to 256 bits.

Is a GUID the same as a UUID?

Yes. GUID is Microsoft’s name for the same 128-bit format. Some Microsoft tools display them in uppercase and wrapped in braces, which the formatting options here can reproduce.