Version
Case
Format:
Click Generate to create UUIDs

Inspect a UUID

Normalizedโ€”
Versionโ€”
Variantโ€”
Further reading: what is a UUID
All UUIDs are generated in your browser using the Web Crypto API. No data is sent to any server.

What Is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit label used to uniquely identify information in computer systems. They are standardised by RFC 4122 and formatted as 32 hexadecimal digits displayed in five groups separated by hyphens: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. The probability of generating a duplicate UUID v4 is so astronomically low it is considered impossible in practice โ€” you would need to generate approximately 2.7 quintillion UUIDs before a 50% chance of collision occurs.

UUID v4 vs v7 vs v1

UUID v4 is generated from random or pseudo-random numbers with no embedded information about when or where it was created โ€” the preferred choice for most use cases, especially where privacy matters. UUID v7 is the modern replacement for v1: it embeds a millisecond-precision Unix timestamp in the first 48 bits, making UUIDs naturally sortable by creation time. This solves the index fragmentation problem that makes v4 a poor fit for database primary keys โ€” databases like PostgreSQL and MySQL handle sequential inserts far more efficiently. UUID v1 is the legacy timestamp format using a 100-nanosecond-resolution timestamp since October 1582 plus a MAC address node โ€” functional but now superseded by v7 for any new work. Our Hash Generator can produce deterministic identifiers when you need the same ID for the same input.

Common Uses

UUIDs are used as primary keys in databases (particularly PostgreSQL and NoSQL databases), as unique identifiers for API resources, session tokens, file names for uploaded files, idempotency keys in payment systems, and correlation IDs for distributed tracing. The advantage over auto-incrementing integers is that UUIDs can be generated on the client side without a database round-trip and reveal no information about record count or creation order.


Frequently Asked Questions

Are the UUIDs generated here truly unique?
UUID v4 uses the browser's crypto.getRandomValues() API, which generates cryptographically secure random numbers. The probability of a collision between two randomly generated v4 UUIDs is approximately 1 in 5.3 ร— 10ยณโถ โ€” effectively zero. For any practical application, UUIDs generated here are unique. That said, no UUID generator can guarantee absolute uniqueness โ€” by mathematical definition there is always a non-zero probability of collision.
What is the difference between UUID and GUID?
They are the same thing. GUID (Globally Unique Identifier) is Microsoft's term for what the broader industry calls UUID. Both follow the same RFC 4122 standard and produce identical formatted output. The terms are fully interchangeable โ€” the choice of which term to use is usually determined by the platform or language you are working in (GUIDs in .NET/SQL Server, UUIDs in most other contexts).
Should I use UUID as a database primary key?
For new projects, UUID v7 is the best choice for database primary keys. It embeds a millisecond timestamp making UUIDs sortable by creation time, which eliminates the index fragmentation caused by random v4 UUIDs. Databases handle sequential inserts far more efficiently than random ones. UUID v4 works fine for identifiers that are never used as clustered index keys โ€” API resource IDs, session tokens, file names. PostgreSQL handles both well natively; MySQL and InnoDB benefit most from v7's ordering.
How do I generate a UUID in code?
JavaScript (Node 16+): crypto.randomUUID(). Python 3: import uuid; uuid.uuid4(). Java: UUID.randomUUID(). Go: use the github.com/google/uuid package. PostgreSQL: gen_random_uuid(). Ruby: SecureRandom.uuid. Most modern languages and frameworks have native UUID generation โ€” you rarely need a third-party library.
What is UUID v7 and why should I use it?
UUID v7 is a newer standard (RFC 9562) that encodes a Unix timestamp in milliseconds in the first 48 bits followed by random bits. This makes v7 UUIDs naturally sortable by creation time โ€” a major advantage over v4 for database primary keys. Index fragmentation drops dramatically because new rows are always inserted at the end of the index. Use v7 for any new database work where insert performance or sort order matters. It is backward-compatible with any system that accepts standard UUID format.
What is the difference between UUID v7 and ULID?
Both UUID v7 and ULID (Universally Unique Lexicographically Sortable Identifier) solve the same problem โ€” sortable unique identifiers. UUID v7 is the official RFC standard and uses the familiar hyphenated UUID format, making it a drop-in replacement in any system expecting UUIDs. ULID uses a 26-character base32 encoding that is slightly more compact and human-readable but is not a standard UUID and requires library support. For new projects, UUID v7 is generally the better choice due to its RFC standardisation and native UUID compatibility.
What is the nil UUID?
The nil UUID is a special case defined in RFC 4122 where all 128 bits are set to zero: 00000000-0000-0000-0000-000000000000. It is used as a sentinel or placeholder value โ€” similar to how null is used in other contexts. It is not a valid generated UUID and should never appear in a system as a real identifier.
Can I decode the timestamp from a UUID v7?
Yes. Paste any UUID into the inspector on this page. For v7 it reads the first 48 bits as a Unix timestamp in milliseconds and shows the UTC time. You can also send that millisecond value to the Unix timestamp to date converter. UUID v4 has no timestamp to decode.