UUID Generator
/uuid-generator/
Related tools
Comments
About this tool
Why you need a UUID generator
A UUID (Universally Unique Identifier) is a 128-bit identifier designed so that values created anywhere in the world do not collide, without any central authority handing out numbers. An auto-increment number in a database is unique only within one server, but UUIDs created separately by several servers, mobile apps and offline devices can be merged later without worrying about clashes.
Read moreShow less
The written form is 36 characters: 32 hex digits split by hyphens into groups of 8-4-4-4-12. In Microsoft environments the same format is called a GUID (Globally Unique Identifier) and is often written in braces. The first standard was RFC 4122 in 2005, and RFC 9562, which replaced it in May 2024, brought the time-ordered version 7 into the official standard.
This tool creates either random version 4 or time-based version 7 UUIDs, from 1 to 100 at a time. You can switch to uppercase or remove the hyphens to get 32 characters, and the IDs are generated on this device when you press Generate.
How UUID v4 and v7 are built, and the odds of a collision
Version 4 takes 16 random bytes from crypto.getRandomValues, fixes 4 bits that mark the version and 2 bits that mark the variant, and leaves the remaining 122 bits random. That is why the third group of a v4 UUID always starts with 4 and the first character of the fourth group is 8, 9, a or b. There are 2^122, about 5.3 × 10^36, possible values.
Collision odds follow the birthday problem: after creating n IDs, the chance that any two match is roughly n² ÷ (2 × 2^122). For a billion IDs that is about 9.4 × 10^-20, and even for a trillion it is about 9.4 × 10^-14. Reaching a 50% chance of a collision takes about 2.7 × 10^18 IDs, which would take about 86 years at a billion per second without pause. Real incidents come from implementations that misuse random number generators rather than from the odds, and this tool uses only crypto.getRandomValues, which draws cryptographic randomness from the operating system.
Version 7 puts the milliseconds elapsed since January 1, 1970 in the first 48 bits and fills the remaining 74 bits, after the 6 version and variant bits, with random data. Because the leading digits are a timestamp, sorting the strings puts them in creation order. A v7 created at 00:00 UTC on October 12, 2026, for example, starts with 01a12d68-b800. A 48-bit millisecond count reaches as far as the year 10889.
Choosing a UUID version for each use
For database primary keys, v7 often has the edge. In B-tree indexes that store rows in primary key order, such as MySQL InnoDB, v4 values land scattered throughout the index, increasing page splits and wasted cache. New v7 values always go near the end, behaving much like auto-increment numbers. PostgreSQL provides a built-in uuidv7() function from version 18.
For request trace IDs, uploaded file names and temporary identifiers where order means nothing, v4 is the plain, safe choice. When you need several IDs at once for test data or configuration files, raise the count and copy them, one per line, with Copy.
The 32-character form without hyphens suits places where you want fewer symbols, such as file names or URLs, and uppercase matches the GUID style of the Windows registry or .NET.
Things to watch when using UUIDs
A v7 UUID contains its creation time. Decoding the first 12 hex digits reveals when it was made, to the millisecond, so avoid using it as a public ID where exposing sign-up or order times would be a problem. This tool's v7 also fills the remaining bits randomly without a counter that guarantees order within the same millisecond, so when you create several at once, IDs from the same millisecond may sort differently from the order they were generated.
UUIDs are hard to guess but they are not secrets. Password reset links and API keys need dedicated security tokens of defined length and purpose, and access rights must be checked separately from the ID. A v7 in particular has only 74 random bits, fewer than v4, and its time portion is predictable.
This tool makes only v4 and v7. It does not support v1, which uses a MAC address and time, or v3 and v5, which hash a name so the same input always gives the same value. Storage matters too: as a string a UUID takes 36 bytes, so databases are more efficient with a 16-byte binary form or a native UUID type. Generated IDs are not stored; only the version, count and format options are kept in this browser for next time, and Reset clears them.
Popular tools
FAQ
Should I use UUID v4 or v7?
Use v4 for identifiers where order does not matter, and v7 where sorting by creation order helps, such as database primary keys. v7 helps insert performance because new values pile up at the end of the index, but keep in mind that it reveals its creation time.
Can two UUIDs ever be the same?
v4 has 122 random bits, so even after a billion IDs the chance of a collision is about 9.4 × 10^-20, and a 50% chance needs about 2.7 × 10^18 IDs. With a proper cryptographic random source, it is not a realistic concern.
Is a GUID the same as a UUID?
Yes. GUID is Microsoft's name for a UUID, in the same format. Windows often writes them in uppercase within braces, so turn on Uppercase and add braces yourself if needed.
How many characters long is a UUID?
It is 32 hex digits, or 36 characters with hyphens in the 8-4-4-4-12 format. Turn off Hyphens to get 32 characters. As a value it is 128 bits, or 16 bytes.
Can I get the creation time from a v7 UUID?
Yes. The first 12 hex digits are the milliseconds since January 1, 1970. Remove the hyphens, convert those 12 digits to decimal, and you have a Unix time in milliseconds that the Unix Timestamp Converter can turn into a date.
How many UUIDs can I generate at once?
From 1 to 100 per click, listed one per line so you can copy them directly. Press Generate again if you need more.