๐ UUID Generator
Generate UUIDs in bulk โ v4 (fully random) or v7 (time-sortable). Useful for database primary keys, issuing request IDs for an API, or creating identifiers for test data.
How to use
- Choose the version to generate (v4 or v7).
- Set the count, and whether to use uppercase or include hyphens.
- Click "Generate" to see a list of UUIDs.
- Click "Copy All" to copy the whole list to your clipboard.
How the calculation works
A UUID (Universally Unique Identifier) is a 128-bit identifier that, for practical purposes, will never collide anywhere โ without any central registry handing out numbers. It is specified in RFC 9562 (formerly RFC 4122) and written as hexadecimal in 8-4-4-4-12 groups. The first digit of the third group is the version. In v4, all 122 bits other than the six marking version and variant are random. This tool generates them with the browser's crypto.randomUUID(), which uses a cryptographically secure random source. In v7, the first 48 bits hold the current time in milliseconds since the Unix epoch and the rest is random. Because the time comes first, UUIDs sort in the order they were created. Used as a database primary key, new rows always land at the end of the index, which is generally more efficient for writes than random v4 keys.
Worked example
A v4 example: 6f1c2a8e-4b3d-4f7a-9c21-8e5d0b7a3f64 โ the third group starts with "4", so it is v4 The first 12 digits of a v7 UUID are the time. Generated at 14:00 Japan time on 18 September 2026, one begins "01a0b2e2-c080-7โฆ", with the third group starting "7". For a 50% chance of a single v4 collision you would need to generate roughly 2.7 ร 10ยนโธ UUIDs.
Things to be aware of
- A v7 UUID reveals when it was created. Use v4 for identifiers whose creation time should not be exposed.
- UUIDs are hard to guess, but they are not recommended as authentication tokens or passwords.
- The 32-character form without hyphens is the same UUID.
- v7 timestamps come from your device's clock; if the clock is wrong, the ordering will be too.
FAQ
What's the difference between v4 and v7?
v4 is fully random. v7 embeds a timestamp at the start, so values sort chronologically, which is often better for database index efficiency.
Can I generate multiple at once?
Yes โ set the count you need and copy them all in bulk.
Which version should I use?
v4 is the widely used default if you have no particular requirement. Choose v7 if you want IDs to sort by insertion order or need better index locality.
Can I generate UUIDs without hyphens?
Yes โ uncheck "Include hyphens" to get a continuous 32-character string with no separators.
Can generated UUIDs collide?
Both v4 and v7 are designed so collisions are astronomically unlikely, so in practice you don't need to worry about duplicates.