Toolstia / UUID generator

Generate UUIDs

This page produces version 4 UUIDs, the random kind that developers use for database keys, file names, request IDs, test fixtures and anything else that needs a label nobody else will pick by accident. Choose a count from 1 to 100 and the list is generated right away, one UUID per line, ready to copy as a block.

Two formatting switches cover the usual variations: upper case for systems that print identifiers in capitals, and a hyphen-free form that gives a plain 32-character string. The list is produced locally by your browser's cryptographic random source, so you can generate as many batches as you like without any account or limit beyond the 100 per batch.

Made in your browser with its secure random generator. Nothing is sent or stored.

How it works

  1. Choose how many you want.
  2. Pick upper case or hyphen-free formats if you need them.
  3. Copy the list.

What version 4 means

Version 4 UUIDs are made from random numbers. Six of the 128 bits are fixed to mark the version and variant, leaving 122 random bits.

Can two be the same?

In practice no. The chance of a collision among random 122-bit values is so small that systems treat them as unique without checking.

Random source

The numbers come from your browser's secure random generator, the same kind used for cryptography, not from Math.random.

When not to use them

UUIDs are identifiers, not secrets. Do not use one as a password or access token on its own. Random v4 UUIDs also index less efficiently in some databases than sequential IDs.

Reading the layout of a v4 UUID

A UUID is shown as five groups of hex digits, 8-4-4-4-12, which is 32 digits for 128 bits. Two positions are not random. The first digit of the third group is always 4, which marks the version, and the first digit of the fourth group is always 8, 9, a or b, which marks the variant. In 3f2504e0-4f89-41d3-9a0c-0305e82c3301 you can see the 4 at the start of 41d3 and the 9 at the start of 9a0c.

The tool builds each value by taking 16 random bytes, forcing those version and variant bits, and printing the bytes as hex. As a sanity check, if every random byte were 255 the result would be ffffffff-ffff-4fff-bfff-ffffffffffff, and if every byte were 0 it would be 00000000-0000-4000-8000-000000000000. Real output is never either of those, but the pattern shows exactly which digits are fixed.

How unlikely a duplicate really is

With 122 random bits there are about 5.3 followed by 36 zeros possible values. A well-known rule of thumb from the birthday problem is that you would need to generate roughly 2.7 quintillion UUIDs before the chance of even one collision reaches 50 percent. A table with a billion rows is nowhere near that range.

That reasoning only holds when the random source is good. This tool uses the browser's secure generator rather than Math.random, which is the property that makes the estimate valid. If you write your own generator in code, use the equivalent secure function for your language.

Choosing between hyphens, case and storage format

The hyphenated lower-case form is the standard text representation and is what most libraries print and parse. The no-hyphen option is handy for URLs, file names and some APIs that want a compact hex string. Upper case is usually cosmetic, since UUID comparison should be case-insensitive, but be careful with systems that compare identifiers as plain strings.

If you store UUIDs in a database, a native UUID or 16-byte binary column is smaller and faster to index than a 36-character text column. Check how your database handles the conversion before you paste the text in bulk.

When a random UUID is the wrong choice

Fully random keys land in random places in a B-tree index, which can slow inserts into very large tables compared with keys that grow over time. Newer time-ordered UUID versions, such as version 7 defined in RFC 9562, were designed for that case. This tool makes version 4 only, so it is a good fit for test data, correlation IDs and keys on modest tables, and less so when index locality matters.

Also remember that a UUID is an identifier, not a credential. Anyone who has seen one can use it, so access to a resource should still be checked by your server.

Using the batch for test data

Because the list is plain text with one value per line, it pastes cleanly into a spreadsheet column, a SQL INSERT you are drafting, or a JSON array after you add quotes. Press Generate again for a fresh set. Changing the count also regenerates the whole list, so copy what you need before you adjust the number.

If you type something that is not a number, or a value above 100, the tool treats it as 1 or 100 respectively rather than showing an error.

Questions

Are the UUIDs stored or sent anywhere?

No. They are made in your browser and disappear when you leave the page.

What is the difference between a UUID and a GUID?

They are the same format. GUID is the name Microsoft uses.

Can I get other versions?

Not yet. This tool makes version 4 UUIDs only.

Are the UUIDs guaranteed to be unique across everyone using this page?

Nothing coordinates between users. Uniqueness comes from the size of the random space, which makes a repeat so improbable that it is ignored in practice.

Can I use these as session tokens or API keys?

A v4 UUID has plenty of randomness, but it is meant as an identifier. For secrets, use a purpose-built token generator with a longer length, and store and rotate it properly.

Why does the third group always start with 4?

That digit records the UUID version. Version 4 means random, so every value from this tool has a 4 there.

Why does the fourth group start with 8, 9, a or b?

Those values mark the standard variant defined for UUIDs. The two top bits of that digit are fixed and the other bits are random.

Do upper-case and hyphen-free versions represent the same UUID?

Yes. They are the same 128 bits written differently, and most parsers accept either style.