Skip to content

UUID Generator (v4 and v7)

Generate RFC 9562 UUIDs in your browser — random v4 or time-ordered v7, in bulk, with uppercase and no-hyphen options. Nothing is sent anywhere.

Runs entirely in your browser. Nothing you paste here is sent to us or anyone else — there is no server processing, no logging of input, and no third-party scripts on this page.

A UUID (universally unique identifier) is a 128-bit value written as 32 hexadecimal digits in the pattern 8-4-4-4-12, used to label things uniquely without a central authority handing out IDs. The tool above generates them in your browser: pick version 4 or version 7, choose how many you want, optionally uppercase them or strip the hyphens, then copy or download the list. Nothing you generate is transmitted anywhere.

What is a UUID?

A UUID looks like f47ac10b-58cc-4372-a567-0e02b2c3d479. It is defined by RFC 9562 (which replaced the older RFC 4122) and is designed so that anyone, on any machine, can mint an identifier that is unique across space and time without coordinating with anyone else. That property makes UUIDs the default choice for primary keys in distributed systems, message and request IDs, file names, and any situation where two independent parties must each create IDs that will never clash when the data is later merged.

The two visible metadata fields are the version (the first hex digit of the third group — 4 or 7 here) and the variant (encoded in the first bits of the fourth group). Everything else is either random or, for v7, a timestamp.

Version 4: random

Version 4 fills the identifier with 122 random bits, leaving only the six version and variant bits fixed. This tool draws those bits from the browser’s cryptographically secure generator, so the output is unpredictable, not merely “random-looking”. With 122 bits of entropy the chance of ever seeing the same value twice is negligible, which is why v4 is the workhorse for opaque identifiers where you never need to sort or decode them.

Version 7: time-ordered

Version 7 is the modern answer to a long-standing problem with v4. Its first 48 bits are the Unix timestamp in milliseconds, big-endian, followed by the version and variant bits and then random data. Because the timestamp sits at the front, sorting v7 UUIDs as text also sorts them by creation time.

That single change matters a great deal for databases. When you use random v4 values as a primary key, each insert lands at a random spot in the index, scattering writes and fragmenting the underlying B-tree. Time-ordered v7 values instead cluster new rows together at the “end” of the index — you keep the decentralised, collision-resistant nature of a UUID while getting insert performance close to a plain auto-increment key. The trade-off is that a v7 UUID reveals roughly when it was created, so avoid it where that timing is sensitive.

v4 vs v7 at a glance

Property Version 4 Version 7
Composition 122 random bits 48-bit timestamp + 74 random bits
Sortable by time No Yes
Reveals creation time No Yes
Good database key Workable, fragments index Recommended, index-friendly
Best for Opaque IDs, tokens, file names Primary keys, event and log IDs

Common use cases

  • Primary keys for rows created across many services that must not collide when merged.
  • Correlation and request IDs threaded through logs and traces.
  • Idempotency keys so a retried API call is only processed once.
  • Unique file names, upload tokens, and session identifiers.

Formatting notes

UUIDs are case-insensitive and the hyphens are only visual grouping, so the uppercase and no-hyphen options above change how the value is displayed, not the value itself. Many databases store a UUID compactly as 16 raw bytes; the hyphenated lowercase string is simply the canonical text form. If you compare UUIDs from different sources, normalise case and remove hyphens first.

Is it safe to generate secrets here?

These UUIDs are generated entirely on your device. There is no server round-trip, no logging, and no third-party analytics on this page, so the values are yours alone. Do keep in mind that a UUID is an identifier, not a secret: it has a fixed, partly predictable structure and should not be used in place of a properly generated password or API token. For those, reach for a dedicated generator that gives you the character set and entropy you need. This tool runs completely in the browser and keeps working even if you go offline after the page loads.

Frequently asked questions

Are these UUIDs generated on a server?

No. Every UUID is generated locally in your browser using the built-in cryptographic random number generator (crypto.randomUUID and crypto.getRandomValues). Nothing is uploaded, logged, or stored — you can disconnect from the internet and it still works.

What is the difference between UUID v4 and v7?

Version 4 is made almost entirely of random bits, so two values are astronomically unlikely to collide but have no relationship to each other. Version 7 puts a 48-bit millisecond timestamp in its leading bits, so UUIDs created in time order also sort in text order. Choose v4 for pure uniqueness and v7 when you want time-sortable identifiers.

Why would I use v7 instead of v4 for a database key?

Random v4 keys scatter inserts across a B-tree index, which fragments it and hurts write performance. Because v7 values increase over time, new rows land near each other in the index, keeping inserts fast and the index compact — much like an auto-increment column but without a central counter.

Can two UUIDs ever be the same?

In theory yes, in practice effectively never. A v4 UUID has 122 random bits, giving about 5.3 x 10^36 possible values. You would need to generate billions per second for many years before a collision became likely, so treating them as unique is safe for real-world use.

Is a UUID a good source of randomness for passwords or tokens?

Not directly. A UUID has a fixed format with version and variant bits, so it is not a raw random string. It is fine as an opaque identifier, but for secrets use a dedicated password or token generator that produces the character set and entropy you need.

Does the uppercase or no-hyphen option change the value?

Only the presentation. UUIDs are case-insensitive, and the hyphens are purely cosmetic grouping. A tool comparing UUIDs should normalise case and hyphens first, but the underlying 128-bit value is identical either way.

Does v7 leak when a record was created?

Yes — the timestamp is readable by anyone who has the UUID. That is the point when you want sortable keys, but if the creation time is sensitive, prefer v4 so no time information is embedded.

How many can I generate at once?

Up to 100 per click here, one per line, ready to copy or download. Because generation is instant and local there is no rate limit or quota; regenerate as often as you like.