Generate UUIDs in version 4 (random) or version 7 (time-ordered), plus the nil and max special cases. Version and variant bits are set exactly as RFC 9562 requires, and formatting options cover hyphens, braces and case without changing the value.
Settings
Recent results
Generated locally in your browser β your settings and results never leave this page.
What the 128 bits are doing
A UUID is a fixed-size identifier designed so that independent systems can generate values without coordinating. There is no registry and no allocation step: you produce one locally and rely on the size of the space to keep it unique. That is a strong guarantee, and it rests entirely on how the bits are chosen.
Not all 128 bits are free. Six are reserved to record the version and the variant, which is how any piece of software can look at a UUID and tell how it was constructed. In a version 4 UUID that leaves 122 random bits. The reserved digits are visible in every value: the thirteenth hexadecimal character is the version, and the seventeenth is always 8, 9, a or b.
Why collisions are not a practical concern
With 122 random bits the space contains more than five undecillion values. The relevant question is not how many exist but how many you can draw before two coincide, and that threshold is roughly the square root of the space β still an enormous number. Generating a billion version 4 UUIDs every second, it would take on the order of eighty-five years before a single duplicate became more likely than not.
That figure assumes the bits are genuinely unpredictable. A generator built on a weak random source can repeat far sooner, and has done so in real systems. This is the entire reason the tool draws from crypto.getRandomValues: the uniqueness argument is a statement about the randomness, not about the format.
Version 7 and the database index problem
Random identifiers are awkward as primary keys. Each new row lands at an unpredictable point in the index, so the database writes to scattered pages instead of appending to the end. On a large, busy table that shows up as slower inserts and a larger index than the data warrants.
Version 7 addresses this directly by putting a millisecond timestamp in the leading 48 bits. Values created later sort after values created earlier, so inserts append rather than scatter, and the index stays compact in the way it would with an auto-incrementing integer. The remaining bits are random, so two UUIDs minted in the same millisecond still differ.
The trade-off is that a version 7 value reveals when it was created. For most applications that is unremarkable. If creation times are sensitive β or if identifiers are exposed publicly and their ordering would tell an observer something about your volume β version 4 keeps that information out of the value.
Formatting is cosmetic
Hyphens, braces and letter case are presentation only. The same 128 bits can be written as a hyphenated lowercase string, an unhyphenated block, or wrapped in braces as some Windows tooling expects. Systems that compare UUIDs should normalise before comparing, because two differently formatted spellings of the same value are the same identifier.
The options here exist because real systems disagree about the spelling. Producing the format your target expects is easier than converting it afterwards.
When a UUID is the wrong tool
UUIDs are large. As a public-facing identifier in a URL they are unwieldy, and a shorter random string is often friendlier. As a sequence number they are wasteful β if a simple counter would do and you have a single authority to issue it, a counter is smaller and faster. UUIDs earn their size when generation has to happen in several places at once without coordination.
Privacy
Every UUID here is generated in your browser. Nothing is transmitted, stored, logged or written into the page URL.
How to use the UUID Generator
- Choose a version. Version 4 is the general-purpose random UUID; version 7 is time-ordered and better as a database key.
- Set how many you need β up to 500 at a time.
- Adjust formatting if your system expects uppercase, braces, or no hyphens.
- Generate, then copy the list or export it as JSON or CSV.
Frequently asked questions
What is a UUID?
A 128-bit identifier written as 32 hexadecimal digits, usually split into five hyphenated groups. Its purpose is to be unique without any central authority handing out numbers: two systems that have never communicated can each mint identifiers and rely on them not colliding.
What is the difference between version 4 and version 7?
Version 4 fills almost the whole value with random bits β 122 of the 128, with the remaining 6 fixed to record the version and variant. Version 7 starts with a 48-bit millisecond timestamp and fills the rest randomly, so values sort in the order they were created. Version 4 is the safe default; version 7 is better as a primary key because sequential inserts keep database indexes compact.
Will a version 4 UUID ever repeat?
In practice, no. With 122 random bits there are more than five undecillion possibilities, and you would need to generate on the order of a billion UUIDs per second for around eighty-five years before a single collision became likely. That guarantee depends entirely on the randomness being sound, which is why this tool uses your browser's cryptographic source rather than Math.random.
Are the version and variant bits set correctly?
Yes. In a version 4 UUID the thirteenth hexadecimal digit is always 4, and the seventeenth is always 8, 9, a or b. Version 7 uses 7 in the same position with the same variant rule. Those digits are not random β they are how software identifies which kind of UUID it is holding, and an identifier that omits them is not a valid UUID.
Can I use a UUID as a database primary key?
Yes, with a caveat. Version 4 UUIDs are randomly distributed, so inserting them scatters writes across an index and can fragment it. Version 7 solves this by leading with a timestamp, so new rows land at the end of the index in the same way an auto-incrementing integer would. If you are choosing today and your database supports it, version 7 is usually the better key.
What are the nil and max UUIDs?
Two special values defined by the specification. The nil UUID is all zeroes and conventionally means "no value" β a placeholder where a UUID is structurally required but none applies. The max UUID is all ones and is used as an upper sentinel in range comparisons. Neither is random and neither should be used as a real identifier.
Do UUIDs leak any information about me?
Version 4 UUIDs contain nothing but random bits. Version 7 encodes the moment it was created, which is visible to anyone holding the value β that is usually harmless and sometimes useful, but worth knowing if creation times are sensitive. Older version 1 UUIDs embedded the machine's network address, which is why they are not offered here.