UUID Generator

Generate UUID v4, v1, v7, v5 and Nil identifiers. Choose format — lowercase, UPPERCASE, no-hyphens or {GUID braces}. Bulk generate up to 100 and download. Paste any UUID into the decoder to inspect its version, variant and timestamp.

uuid-generator.tool
uuid-decoder.tool

Which UUID Version Should You Use?

v4 is the right default for most use cases — fully random, no information encoded, no coordination needed between servers. Use it for database primary keys, session tokens, and any ID that just needs to be unique.

v7 is increasingly preferred for database primary keys over v4. It embeds the current millisecond timestamp in the first 48 bits, so UUIDs sort chronologically. This matters for B-tree indexes — randomly ordered v4 UUIDs cause page splits and fragmentation; time-ordered v7 UUIDs insert at the end, much like an auto-increment integer.

v1 also uses a timestamp but in a less sort-friendly arrangement — the least-significant time bits come first, making them appear random in sort order. It also includes the MAC address of the generating machine, which is a privacy concern in some contexts.

v5 generates a deterministic UUID from a namespace and a name using SHA-1 hashing. The same namespace and name always produce the same UUID — useful for generating stable IDs for known entities without storing them.

Nil is all zeros. Used as a null or unset UUID value in APIs and databases that require a UUID type but need to represent absence.

GUID vs UUID

GUID (Globally Unique Identifier) is Microsoft's term for the same concept. GUIDs are typically displayed with uppercase letters and curly braces: {550E8400-E29B-41D4-A716-446655440000}. Select the {GUID braces} format option to generate in this style, which is what Windows, .NET and SQL Server expect.

UUID Decoder

The decoder panel reads the version and variant directly from the UUID structure — they are encoded in specific bit positions, not random. For v1 and v7 UUIDs it also extracts the embedded timestamp and converts it to a readable date and Unix timestamp.

Frequently Asked Questions

UUIDs are 128-bit values — too large for a database to keep perfectly sorted in a B-tree index the way auto-increment integers are. v4 UUIDs are fully random, so every insert goes to a random position in the index, causing frequent page splits and writes across the whole index. v7 UUIDs start with the current millisecond timestamp, so new records always sort at the end — the same access pattern as an auto-increment ID, but globally unique without a central counter. PostgreSQL, MySQL and most modern databases benefit measurably from this.
v4 UUIDs have 122 bits of randomness (the other 6 bits encode the version and variant). The probability of generating the same UUID twice across all devices in history is astronomically small — roughly 1 in 5 undecillion. In practice, UUID collisions do not happen. This tool uses the browser's crypto.getRandomValues() function, which is a cryptographically secure random number generator, not Math.random().
A v5 UUID is generated deterministically from two inputs: a namespace UUID (DNS, URL, OID or X.500) and a name string. SHA-1 is applied to the combined bytes and the result is formatted as a UUID. The key property is that the same namespace and name always produce the same UUID — there is no randomness. This is useful when you need a stable, reproducible ID for a known entity, like generating a consistent UUID for a domain name or a product SKU, without storing the UUID in a database.
Nothing fundamental — GUID (Globally Unique Identifier) is Microsoft's name for the same RFC 4122 standard. The difference is purely cosmetic: GUIDs are conventionally displayed with uppercase letters and wrapped in curly braces, like {550E8400-E29B-41D4-A716-446655440000}. UUIDs are conventionally lowercase without braces. If you are working with .NET, SQL Server, or Windows APIs, use the {GUID braces} format option in this tool.
Use the UUID Decoder panel on this page. Paste any UUID and it will show you the version (from the 13th character), the variant (from the 17th character), and for v1 and v7 UUIDs the embedded timestamp is extracted and shown as a readable date. This is useful when debugging systems that pass UUIDs and you need to know when a record was created or which version scheme a third-party API is using.
Yes. UUID generation runs entirely in your browser using the Web Crypto API (crypto.getRandomValues), which is cryptographically secure. Nothing is sent to any server. For bulk use in production systems, most programming languages have native UUID libraries — use those for server-side generation at scale. This tool is best for one-off IDs, testing, seeding development data, or generating a handful of IDs to paste into a config file.