UUID Generator

Generate version-4 (random) UUIDs, one at a time or in batches of up to 50 — instantly, in your browser.

  • Free — No signup required
  • Instant — Results update as you type
  • Private — Processed in your browser

A UUID is a 128-bit identifier written as 32 hexadecimal digits in five groups, such as 3f2504e0-4f89-41d3-9a0c-0305e82c3301. Version 4 fills 122 of those bits with random data, which makes collisions so improbable that independent systems can mint IDs without coordinating. This tool generates them in batches with the browser's cryptographic random source.

How it works

Enter a quantity from 1 to 50 and the tool calls crypto.randomUUID() once per identifier. That function is part of the Web Crypto API and draws from the operating system's random number generator, not from Math.random. The output follows RFC 9562 (which supersedes RFC 4122): the third group starts with 4 to mark the version, and the fourth group starts with 8, 9, a or b to mark the variant. Everything else is random. Letters are lowercase, which is the canonical form; consumers should compare case-insensitively.

Press Regenerate for a fresh batch. Each row has its own copy button; Copy all puts the whole batch on the clipboard one per line, ready for a spreadsheet, a fixture file or a SQL IN list. Nothing is sent to a server, and no identifier is remembered after you leave the page.

The batch is generated after the page has loaded rather than during server rendering, so the IDs you see were produced on your device.

How unique is unique

With 122 random bits there are about 5.3 × 10³⁶ possible values. The probability of any collision among n identifiers is roughly n² ÷ 2¹²³. You would need to generate around 2.7 × 10¹⁸ UUIDs before the chance of a single duplicate reaches 50%; at a billion per second that takes over 85 years. In practice a duplicate signals a bug (a copied database row, a cached value, a broken random source) rather than bad luck.

That guarantee rests on the quality of the randomness, which is why the tool uses the cryptographic generator. Versions that derive from a MAC address and a clock (version 1) or from hashing a name (versions 3 and 5) make different trade-offs and are not offered here.

UUIDs as database keys

Random UUIDs are convenient primary keys: clients can create records offline, services can merge data without renumbering, and an ID reveals nothing about how many rows exist. The cost is index locality. Each new random key lands at an arbitrary position in a B-tree, so inserts touch pages all over the index and cache efficiency drops compared with an auto-incrementing integer. On PostgreSQL store them in the native uuid type (16 bytes) rather than as a 36-character string, and on MySQL consider the BINARY(16) form for the same reason.

If insert order matters at scale, the newer version 7 puts a millisecond timestamp in the leading bits so keys are mostly sequential while still being unique without coordination. Browsers do not yet expose a built-in for it, so it is generated in application code or by the database.

Do not use a UUID as a secret. Version 4 values are unpredictable, but they appear in URLs, logs and referrer headers, and "unguessable ID" is not an access control. Use them to identify, and authorise separately.

Command-line equivalent

Most systems ship a generator:

uuidgen                                  # Linux (util-linux) and macOS
python3 -c 'import uuid; print(uuid.uuid4())'

On Linux uuidgen -r forces the random version explicitly, and cat /proc/sys/kernel/random/uuid works without any package.

Learn more

Choosing between natural keys, surrogate integers and UUIDs is a schema-design decision with long consequences; database design and normalisation lays out the trade-offs, and indexes and execution plans shows what random keys do to an index in practice. For values that must be secret rather than merely unique, use the password generator.

FAQ

What's the difference between a UUID and a GUID?
They're effectively the same concept — UUID (Universally Unique Identifier) is the standard term, while GUID (Globally Unique Identifier) is Microsoft's name for it. This tool generates standard version-4 (random) UUIDs, compatible with both.
How unique are these UUIDs really?
Version-4 UUIDs are generated from 122 random bits — the odds of a collision are astronomically small, making them safe to use as unique identifiers in databases and distributed systems.
Can I generate more than 50 at once?
The tool caps quantity at 50 per batch to keep the page fast and the output manageable to copy — regenerate for additional batches if you need more.