128 bits, and every one of them has a job.
Generate random v4 UUIDs or time-ordered v7 ones, one at a time or in bulk. IDs are created in your browser from its secure random generator. Hover the ID below to see what each part is for.
85661817-6640-467d-8482-1506b47158b1e7da7280-07e2-4030-b0d4-a644c856f227fc2c0a69-6a20-4bc5-b86e-0210a3bf306d8ca3ed73-4f5d-4db7-8cae-6d5f050cac976ff9bc30-3e52-4880-848b-784f99001eca93a3a45b-7e2f-47c9-91fe-a5755cffe47f57de83db-e2ab-42c1-b9c6-8ac7ec7cb2c7635c48e2-1873-42d4-a453-200d296f79dec9b80ab0-fc96-4226-b239-b8f7775949c768a7d830-a24b-4664-9523-e86ae5b37d4057d409e1-3cef-45ff-a6e8-2769fcb6bc79edfd6c0d-c7aa-49ce-b3e7-e1df051701391b6e7d32-cf38-4a26-9576-084d5bae8be358ae6191-5ede-4a58-aca3-beab138d67c313c422e7-d84f-45e7-a9f1-376213426d6e7e548c13-de50-41b5-a481-726048401707684ae924-dfb8-4dc0-b379-53d233670694159d542b-9290-4a81-a868-52c446242a4457f84094-4149-47d3-9ed8-e37fbe674835a36dd241-ac93-4072-ba8e-9354a1c2a027
A database keeps primary keys sorted. New v4 IDs land anywhere in that order, so the database keeps splitting pages to make room. v7 starts with a timestamp, so each new ID goes at the end, like an auto-increment number. Insert four rows and watch where they go.
In principle yes; in practice no. A v4 UUID has 122 random bits. Using the birthday-problem estimate, pick how fast you create IDs and for how long, and see the odds of even one duplicate.
The short answer is v7 for database keys and v4 for everything else. The details matter for a few cases.
The 13th hex digit gives the version and the top bits of the 17th give the variant. From there each version has its own layout. v1 and v6 hide a 60-bit count of 100-nanosecond ticks since the Gregorian calendar reform of 15 October 1582, plus a clock sequence and node ID that can be a real MAC address. v7 holds Unix milliseconds. Paste any ID, or try the examples.
Version 5 doesn’t use randomness at all. It hashes a namespace UUID followed by a name with SHA-1, keeps the first 16 bytes and overwrites six bits with the version and variant. Two systems that never talk can derive the same ID for “example.com”. Computed below with this browser’s Web Crypto. Version 3 is identical but uses MD5.
All eight versions in RFC 9562, which replaced RFC 4122 in May 2024, with the two special values and the identifiers that compete with UUIDs.
Developer tools people use alongside this one.