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.
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.