UUID Generator

Generate one or up to 1000 universally unique identifiers in version 4 or version 7 format, laid out the way you need them. Free and instant, they are produced locally by the secure random source built into your browser.

UUID GeneratorPrivate · runs on your device
Your UUIDs will appear here

How to use the UUID generator

Choose the options first, then press the button: the list is only created when you ask for it, and changing an option afterwards does not rewrite what is already on screen.

  1. Pick a Version: v4 (random) or v7 (time-ordered).
  2. Set How many, from 1 to 1000. The default is 5.
  3. Tick Uppercase if your schema or style guide wants capital hex digits.
  4. Tick Remove dashes for a compact 32-character string, handy for file names or systems that store plain hex.
  5. Press Generate UUIDs, then Copy to put the whole list on the clipboard, one UUID per line, or Download .txt to save it as a file.

A typical batch of five looks like five lines of 36 characters each; with Remove dashes ticked each line becomes 32 characters, and with Uppercase ticked the letters a to f become capitals. The values themselves are unchanged by those two options, so a system that stores UUIDs as plain hex will read the compact form as the same identifier.

Version 4 values come from crypto.randomUUID() where the browser provides it, otherwise from crypto.getRandomValues(). Version 7 values are built from the current time in milliseconds plus crypto.getRandomValues(). Nothing is requested from or sent to a server. Other versions (1, 3, 5, 6 and 8), braces and namespace UUIDs are not offered.

Reading the format

Test data, mock API responses, correlation IDs for log lines and idempotency keys for payment retries are all common reasons to need a batch of identifiers quickly. Whatever the use, it helps to know what the characters mean.

A UUID is a 128-bit number written as 32 hexadecimal digits in five groups, 36 characters with the hyphens: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx. The digit M is the version and N carries the variant, which is 8, 9, a or b for both versions here. Two example layouts, shown for format only:

VersionExampleContent
4f47ac10b-58cc-4372-a567-0e02b2c3d479122 random bits
7017f22e2-79b0-7cc3-98c4-dc0c0c07398f48-bit Unix time in milliseconds, then 74 random bits

In the version 7 example the first 12 hex digits, 017f22e279b0, decode to 22 February 2022 at 19:22:22 UTC. That is why v7 values sort by creation time and v4 values do not. Microsoft calls the same structure a GUID, and the two names are interchangeable. The specification is RFC 9562, which replaced RFC 4122.

Collisions, database keys and when to choose v7

A version 4 UUID has 2^122 possible values, about 5.3 x 10^36. You would need to create roughly 2.7 x 10^18 of them before the chance of one duplicate reached fifty percent, so accidental collisions are not a practical concern as long as the random source is sound.

  • Primary keys across services. Clients can create keys offline without asking the database for the next number.
  • Public identifiers. Unlike auto-increment integers, they do not reveal how many records exist.
  • Storage. A UUID needs 16 bytes as binary but 36 as text, so use a binary or native UUID column where the database has one.

Random v4 keys scatter inserts across a B-tree index, which hurts write speed and cache use on large tables. Version 7 values are larger than earlier ones, so inserts land near the end of the index. One honest limit: this tool does not add a counter, so values created within the same millisecond may come out in any order relative to each other, so a big batch is only sorted to the nearest millisecond. Choose v4 when creation time must stay hidden, and treat any UUID as an identifier, not a secret; for secrets use the strong password generator. To record when a v7 value was made, convert its prefix with the Unix timestamp converter, and for fingerprints of content use the hash generator.

If you only need a few for a test fixture, the default of five is enough. To seed a table, ask for up to 1000 and press Generate UUIDs again for more, since each press makes a fresh set. Remember that a dashed UUID is 36 characters as text, so a 32-character column would cut it short.

Quick answers

Frequently asked questions

The questions people ask most, answered in plain words.

What is the difference between UUID v4 and UUID v7?

Version 4 fills 122 bits with random data, so values are unpredictable and carry no information. Version 7 begins with a 48-bit millisecond timestamp followed by random bits, so values sort by creation time. Use v7 for database keys and logs, and v4 when creation time must stay hidden.

Are UUIDs really unique?

They are unique in practice, not by absolute guarantee. A version 4 UUID has 2^122 possible values, so even billions per second for centuries would be unlikely to repeat one. The guarantee depends on a sound random source, which is why this tool uses the browser cryptographic interface.

Is a GUID the same as a UUID?

Yes. GUID is the name Microsoft uses for the same 128-bit identifier. The layout, version digit and variant bits are identical. Some Windows tools print GUIDs in uppercase or wrapped in braces, but the value is unchanged and any UUID library will parse it once the braces are removed.

Can I use a UUID as a database primary key?

Yes, and many systems do. The trade-off is index size and insert pattern: random v4 values spread writes across the index, which slows large tables. Version 7 keeps inserts close to sequential while staying globally unique and safe to generate on clients.

Why did changing an option not change my UUIDs?

The list is only created when you press Generate UUIDs. Changing the version, count, uppercase or dash setting afterwards leaves the existing list as it was, so press the button again to get a fresh list in the new format. Copy and Download .txt always use what is on screen.