A UUID is the quickest way to give a database row, a file, a message or a test fixture an identifier that will not clash with anyone else's, without asking a central server for the next number. This generator produces version 4 UUIDs, the familiar random kind, and version 7 UUIDs, the newer time-ordered kind that databases handle much better as primary keys.
IDs are created in your browser with its cryptographically secure random number generator. Nothing is fetched from or logged on a server, so the values you copy have never been seen by anyone else.
Anatomy of a UUID
A UUID (universally unique identifier, called a GUID in the Microsoft world) is a 128-bit value written as 32 hexadecimal digits in five groups, 8-4-4-4-12, for example 3f2b8c1e-9d4a-4c7e-b1f0-6a2d9e8c4b51. Two positions are fixed by the standard, RFC 9562: the first digit of the third group is the version, 4 or 7 here, and the first digit of the fourth group is always 8, 9, a or b, marking the variant. Everything else carries data.
In a version 4 UUID, the remaining 122 bits are random. That space is so large that you would need to create roughly 2.7 quintillion (2.7 × 10^18) of them before the chance of even one duplicate reached 50 percent. Version 7 starts with a 48-bit Unix timestamp in milliseconds, followed by bits that this generator uses as a counter within the same millisecond, and ends with 62 random bits. Sorting v7 UUIDs as plain text therefore sorts them by creation time, to the millisecond.
Choosing between v4 and v7
Database primary keys: v7
Random v4 keys land at random positions in a B-tree index, which causes page splits and poor cache use as tables grow, especially with clustered indexes such as MySQL InnoDB. Time-ordered v7 keys are appended near the end of the index, much like an auto-increment column, while still being safe to generate in the application or on the client.
Public tokens and opaque IDs: v4
A v7 UUID reveals roughly when it was created. When an identifier appears in URLs or API responses and its creation time should stay private, a random v4 UUID gives nothing away.
Test data, fixtures and config files
Seed scripts, mock API responses and correlation IDs for tracing often need dozens of unique values at once. Generate up to 1,000 in one go and download them as a text file with one UUID per line.
Windows and .NET GUIDs
Registry entries, COM class IDs and Visual Studio project files usually write GUIDs in uppercase inside curly braces. The Uppercase and Braces switches produce exactly that form.
How the UUIDs are generated
Version 4 uses the browser's crypto.randomUUID function where it exists, which draws from the operating system's secure random source, and falls back to crypto.getRandomValues with the version and variant bits set by hand. Math.random is never used.
For version 7, the generator reads your device clock in milliseconds. When several IDs are created in the same millisecond, which is normal in a batch of 1,000, the 12-bit counter after the version digit increases by one each time, following method 1 of RFC 9562 section 6.2. Every list you generate is therefore in strict ascending order. The formatting switches only change presentation: Hyphens off gives 32 bare hex digits, Uppercase changes the letters, Braces wraps each value in curly brackets.
Cara memakai alat ini
- Under Version, choose v4 (random) or v7 (time-ordered).
- Enter how many you need, from 1 to 1,000.
- Set the Uppercase, Hyphens and Braces switches to match your target format. The list regenerates whenever you change an option.
- Press Generate for a fresh batch, then use Copy all or download the list as a text file.
Limitations
- Only versions 4 and 7 are generated. Name-based v3 and v5, the MAC-address based v1 and v6, and the nil UUID are not offered.
- A batch is capped at 1,000 IDs. Generate several batches if you need more.
- Version 7 timestamps come from your device clock; if the clock is wrong, the embedded time is wrong too.