How to use the UUID generator
- Pick a Version: v4 random for most jobs, or v7 time-ordered when you want IDs that sort by creation time, such as database keys.
- Set the format with Letter case, Remove hyphens and Wrap in braces. Uppercase with braces gives the Windows registry style of GUID.
- Press Generate new UUID for one. For a batch, enter a Quantity, choose a List style and press Generate UUIDs.
- Use Copy, Copy all or Download .txt. Changing the format reformats the UUIDs on screen; changing the version makes new ones.
How the UUIDs are built
A UUID is 128 bits written as 32 hex digits in groups of 8-4-4-4-12. The layout follows RFC 9562 (May 2024), which replaced RFC 4122. A v4 UUID is 122 random bits from your browser's crypto.getRandomValues plus 6 fixed bits: the digit 4 that starts the third group, and the variant bits that make the fourth group start with 8, 9, a or b. A v7 UUID starts with a 48-bit Unix timestamp in milliseconds, then the version digit 7, then 74 random bits. When several v7 UUIDs are made in the same millisecond, each random part is the previous one plus a random step (the RFC's monotonic random method), so a list always sorts in creation order.
Worked example
With the starting settings (v4 random, lowercase, hyphens, Quantity 10) the tool shows one UUID under Your UUID and ten in the bulk list. Every one has the shape xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, for example 9b2f6c1e-3d4a-4f8b-a1c7-5e0d92b4c3f6 (an illustration, not a real ID): the third group starts with 4 and the fourth with a. There are 2122 (about 5.3 x 1036) v4 values. Switch to v7 and you get values like 01939c1e-5b3a-7c2d-8e4f-6a1b2c3d4e5f. Its first 12 hex digits, 01939c1e5b3a, equal 1,733,491,055,418 ms after 1 January 1970, which is 6 December 2024, 13:17:35.418 UTC. For v7 the tool prints that embedded time under the UUID.
Limits and edge cases
- A batch is capped at 1,000 UUIDs. Press Generate UUIDs again for more. A blank, zero or fractional Quantity shows a message instead of generating.
- A v7 UUID reveals when it was created, to the millisecond. Use v4 if that matters.
- v7 uses your device clock. If the clock jumps backwards, the tool keeps the last timestamp so the order never goes backwards.
- There is no
Math.random()fallback: a browser withoutcrypto.getRandomValuesgets an error. - Versions 1, 3, 5, the nil UUID and the max UUID are not generated here.
Frequently asked questions
What is the difference between a UUID and a GUID?
None in format. GUID is Microsoft's name for the same 128-bit identifier. GUIDs are often shown in uppercase inside braces, which you can get with Letter case set to UPPERCASE and Wrap in braces ticked.
Should I use UUID v4 or v7 as a database primary key?
v7 is usually the better key. Its timestamp prefix makes new rows land at the end of an index, while random v4 values scatter inserts and can slow large tables. RFC 9562 says to prefer v7 over v1 and v6 where possible. Use v4 when the creation time must stay hidden.
Can two UUIDs ever be the same?
In theory yes, in practice no. A v4 UUID has 122 random bits, so a 50% chance of one repeat needs about 2.7 quintillion UUIDs. No central registry is needed, so any device can create them offline.
Are UUIDs safe to use as passwords or access tokens?
No. RFC 9562 says UUIDs should not be treated as secrets or as security capabilities, and v7 is partly predictable from its time. For a password or API key, use the password generator, which lets you pick the length and character types.
How do I generate a UUID in code?
In JavaScript call crypto.randomUUID(), which returns a v4 UUID in secure contexts. In Python use uuid.uuid4(), and in PostgreSQL 13 or later use gen_random_uuid().
Need a secret instead of an ID? Make one with the password generator. To fingerprint some text, try the hash generator, and for plain random numbers use the number randomizer.
Sources: IETF RFC 9562, Universally Unique IDentifiers; MDN, Crypto.getRandomValues(); MDN, Crypto.randomUUID().