Skip to content
uuidgen

Private by design: made in your browser, never sent anywhere

UUID & GUID generator

Random v4 and time-sorted v7 UUIDs, plus v1, v6 and name-based v5 and v3. Make one or ten thousand, in whatever format your code needs, and decode any UUID to see what's inside.

Version

122 random bits from your browser's secure random number generator. The everyday choice.

Format

0 UUIDs

Want to look inside a UUID? Paste it into the decoder.

Tools

Anatomy of a UUID

A UUID is 128 bits, written as 32 hex digits in groups of 8-4-4-4-12. Whatever the version, two places are fixed: the first digit of the third group is the version, and the first digit of the fourth group holds the variant (8, 9, a or b for standard UUIDs). The rest depends on the version:

Version 4 (random)

f47ac10b-58cc-4372-a567-0e02b2c3d479

Version · variant · everything else is random.

Version 7 (time-ordered)

019a5c7e-3b2d-7f4a-9c1e-5b8d2a6f3e10

Unix time in milliseconds · version · variant · random bits.

UUID versions

VersionBased onHow it worksStatus
v1Time + nodeGregorian timestamp (100 ns), clock sequence and a node ID, traditionally the MAC address. Leaks when and where it was made.Legacy
v3Name-based (MD5)MD5 of a namespace UUID plus a name. Deterministic.Use v5
v4Random122 random bits. The most widely used version.Recommended
v5Name-based (SHA-1)SHA-1 of a namespace UUID plus a name. The same input always gives the same UUID.Recommended
v6Sortable time + nodev1's fields reordered so they sort by time.Migration
v7Unix time + random48-bit Unix milliseconds then 74 random bits. Sorts by creation time.Recommended
v8CustomVendor-specific layout; only the version and variant bits are fixed.Special

Version 2 (DCE Security) is reserved for an old POSIX scheme and is almost never used.

Frequently asked questions

Are UUIDs really unique?+

For practical purposes, yes. A version 4 UUID has 122 random bits, so there are about 5.3 × 10³⁶ of them. You would need to make about 2.7 × 10¹⁸ (a billion a second for 86 years) for a 50% chance of a single duplicate. In practice a duplicate means a broken random number generator, not bad luck.

What's the difference between a UUID and a GUID?+

Nothing but the name. GUID (globally unique identifier) is what Microsoft calls a UUID. Windows tools tend to write them in uppercase inside {braces}, but the 128-bit value is the same. The one real difference is byte order: .NET's Guid.ToByteArray() and the Windows GUID struct store the first three groups little-endian. The decoder shows both.

Should I use v4 or v7?+

v7 for database primary keys: it starts with a timestamp, so new rows go at the end of the index instead of at random places, which keeps inserts fast. v4 when the ID shouldn't reveal when it was made, or when you just need a random ID. Both are equally unique.

Is it safe to use a UUID as a secret token?+

A v4 UUID from a secure generator (like this page, or crypto.randomUUID()) is hard to guess, but UUIDs aren't designed as secrets and are often logged or shown in URLs. For session tokens, password-reset links or API keys, use a dedicated random token of 128 bits or more. Never use v1, v6 or v7 as secrets: much of their content is a timestamp.

Are UUIDs case-sensitive?+

No. RFC 9562 says to output lowercase but to accept either case, so 550E8400-… and 550e8400-… are the same UUID. Compare them case-insensitively, or store them as 16 bytes (Postgres uuid, SQL Server uniqueidentifier, MySQL BINARY(16)) rather than as text.

Is anything sent to a server?+

No. UUIDs are made in your browser with crypto.getRandomValues, and nothing you generate or paste is uploaded or stored anywhere.