A UUID is a 128 bit value, almost always written as 32 hexadecimal digits split into five groups by hyphens, designed to be unique across systems without any central coordinator handing out numbers. The odds of two randomly generated UUID v4 values colliding are so small that it is treated as effectively impossible in practice, which is why UUIDs are the default choice for primary keys, request identifiers and distributed system identifiers everywhere.
UUID v4 versus UUID v7: what actually changed
UUID v4, defined originally in RFC 4122, is 122 bits of randomness with 6 fixed bits marking the version and variant. It carries no information at all beyond its own value, which is exactly the point: two v4 UUIDs generated a year apart look no different from two generated a millisecond apart. That randomness is also its main weakness as a database primary key, since inserting rows in random order defeats the sequential locality that most database index structures are optimised for, leading to slower writes and fragmented indexes at scale.
UUID v7, standardised more recently in RFC 9562, fixes exactly that problem by putting a 48 bit millisecond precision Unix timestamp in the first part of the identifier, followed by random bits for the rest. The result sorts chronologically as plain text or as a byte comparison, which means UUID v7 values inserted into a database arrive in roughly the same order as their timestamps, giving you the index friendly behaviour of an auto incrementing integer while keeping the collision resistance and decentralised generation of a UUID.
- Choose UUID v4 when you want an identifier with zero information leakage, not even creation time.
- Choose UUID v7 as a primary key in a database, since its natural sort order keeps indexes efficient.
- Both versions have effectively the same collision resistance for any realistic generation rate.
- UUID v7 leaks approximate creation time to anyone who sees the identifier, which v4 does not.
Generate UUID online in bulk
Set a count and this uuid generator produces that many identifiers in a single pass, each one independently random, ready to paste into a seed script, a test fixture or a spreadsheet. There is no practical upper limit beyond what your browser tab can comfortably render, and choosing to generate uuid online in batches of several thousand still takes a fraction of a second since the underlying random source is implemented natively.
Every value in a batch is generated fresh, never derived from a previous one, so there is no relationship between consecutive UUIDs in the list beyond the ordering that UUID v7 intentionally encodes through its timestamp.
Formatting options: case and braces
The canonical UUID format uses lowercase hex digits, and that is what most systems expect by default. Some environments, most notably older Microsoft tooling and certain COM interfaces, expect uppercase digits or the whole value wrapped in curly braces, such as the format Windows registry GUIDs traditionally use. This uuid generator lets you toggle uppercase or brace formatting rather than hand editing dozens of generated values afterward.
How this uuid generator works under the hood
UUID v4 values are produced with crypto.randomUUID, a Web Crypto API method built directly into every modern browser that returns a correctly formatted, cryptographically random v4 UUID in one call, with the version and variant bits already set correctly by the browser itself. This tool never falls back to Math.random for any part of a UUID, since Math.random is not cryptographically secure and should never be used for anything an identifier's uniqueness depends on.
UUID v7 has no equivalent one line browser API yet, so it is implemented directly from the RFC 9562 layout: the current time in milliseconds fills the first 48 bits, the version and variant bits are set in their fixed positions, and the remaining bits are filled using crypto.getRandomValues, the same cryptographically secure random source crypto.randomUUID itself is built on.
| Property | UUID v4 | UUID v7 |
|---|---|---|
| Randomness | 122 bits | About 74 bits |
| Embeds a timestamp | No | Yes, millisecond precision |
| Sorts chronologically | No | Yes |
| Best for | Opaque, unlinkable identifiers | Database primary keys |
| Specification | RFC 4122 | RFC 9562 |
How to use this uuid generator
- 1
Choose UUID v4 or v7
Pick fully random v4, or time ordered v7 if the identifier will be used as a database key.
- 2
Set the quantity
Generate a single UUID or a bulk batch of thousands in one pass.
- 3
Choose formatting
Toggle uppercase digits or curly brace wrapping to match what your target system expects.
- 4
Copy the result
Copy a single value or the whole batch, one identifier per line, ready to paste elsewhere.
Related tools worth bookmarking
Sources and further reading
- MDN: Crypto.randomUUIDThe browser API this tool uses to generate UUID v4 values with correct version and variant bits.developer.mozilla.org
- RFC 9562: Universally Unique IDentifiers (UUIDs)The current specification defining UUID v7 and updating the original UUID v4 definition.rfc-editor.org
- OWASP Cheat Sheet SeriesGuidance on why identifiers with security implications must come from a cryptographic random source.owasp.org
Frequently asked questions
Common questions about the uuid generator.
UUID v4 is entirely random with no embedded information. UUID v7 embeds a millisecond precision timestamp in its first bits, which makes generated values sort in roughly chronological order. Use v7 for database primary keys where sort order matters, and v4 when you want an identifier that reveals nothing about when it was created.
For UUID v4, with 122 random bits, the probability of any collision among a billion generated values is still astronomically small, far lower than the odds of a hardware failure corrupting your data independently. UUID v7 keeps a similar number of random bits within each millisecond, so collisions remain effectively impossible at any realistic generation rate.
Math.random is not cryptographically secure and, depending on the browser, its output can sometimes be predicted or has noticeably weaker statistical randomness than a dedicated secure generator. This tool always uses crypto.randomUUID or crypto.getRandomValues instead, the same sources used for session tokens and cryptographic keys.
Yes. Set the quantity field to any number your browser tab can comfortably display, and every identifier is generated independently using the same cryptographically secure random source as a single UUID. Several thousand values generate essentially instantly.
Yes, approximately. Since the first 48 bits are a millisecond precision timestamp, anyone who can read a UUID v7 value can extract roughly when it was generated. That is an intentional tradeoff for the sortability it provides, and it is worth knowing before using v7 somewhere that creation time should stay private.
No. Every UUID is generated locally in your browser using the Web Crypto API, with no network request involved at any point. This matters most when generating identifiers for sensitive records where you would rather not have a third party log every value you create.
Yes. GUID and UUID refer to the same underlying concept, a 128 bit identifier intended to be unique without central coordination, with Microsoft historically using the term GUID for what is otherwise a standard UUID. This tool works as a random guid generator producing values fully compatible with any system that expects a GUID.