What a UUID v4 contains
A UUID v4 is a 128-bit identifier built almost entirely from random bytes. Its 32 hex digits are grouped 8-4-4-4-12, and two nibbles are pinned: the 13th digit is always 4 (the version) and the 17th is always 8, 9, a or b (the variant). The other 122 bits are random, so independent machines can create IDs and never collide in practice.
Worked example: 9f1c2a74-8b3e-4d6f-9a01-2c5e7b8d4f10. The first 12 digits are random, the 4 in position 13 marks version 4, the 9 in position 17 marks the variant, and the last 30 hex digits are random too. Because every bit is random, a v4 carries no meaning and sorts arbitrarily — ideal for session IDs, request IDs and filenames, but wrong for a database primary key, where random order fragments the index.
How to generate a UUID v4
- Click Generate to create a fresh random UUID v4.
- Use the copy button, and generate as many as you need.
- Paste the value into your config, database row or API payload.
- Need sortable IDs? Switch to the UUID v7 page.
UUID v4 — frequently asked questions
Is a UUID v4 guaranteed unique?
No identifier is mathematically guaranteed unique, but v4 is unique in practice: you would need about 2.7 × 10^18 values before a 50% chance of even one collision.
Can I use a UUID v4 as an API token?
No. It is random but not a cryptographic secret designed for that role. Use a dedicated token generator with at least 128 bits from a CSPRNG.
Why is my v4 different every time?
That is the point: each generation draws new random bytes, so no value repeats and no pattern can be inferred.
Runs entirely in your browser via crypto.getRandomValues(): UUIDs are generated on your device and never sent to a server.
