UUID Generator

Generate random v4 UUIDs instantly.

What a UUID v4 Is

A UUID (Universally Unique Identifier) is a 128-bit value written as 32 hex digits in a 8-4-4-4-12 pattern, like f47ac10b-58cc-4372-a567-0e02b2c3d479. Version 4 UUIDs are random: of the 128 bits, 122 are drawn from a cryptographically secure random source, while 6 are fixed by the spec — the 4 starting the third group marks the version, and the first character of the fourth group is always 8, 9, a, or b (the variant bits). That leaves 2¹²² ≈ 5.3 × 10³⁶ possible values, which is why nobody coordinates UUIDs and collisions still never happen in practice.

Bulk Generation, Properly Random

Set a count from 1 to 50 and click Generate; Copy All puts the batch on your clipboard one UUID per line, ready to paste into a SQL seed script, a fixtures file, or a spreadsheet column. Each UUID comes from the browser's native crypto.randomUUID() — a CSPRNG-backed API, not Math.random(). That distinction matters: Math.random() is predictable enough that "UUIDs" built from it can collide or be guessed; the Web Crypto source cannot.

Where UUIDs Beat Auto-Increment IDs

  • Distributed systems: any client or service can mint an ID with zero coordination — no central counter, no round-trip to the database.
  • Merging data: rows created offline or in separate databases can be combined without ID conflicts.
  • Non-guessable references: sequential IDs leak information (/invoice/1041 invites probing /invoice/1042); random UUIDs don't enumerate. They're unguessable, though — not a substitute for real authorization checks.
  • Generated before insert: your code knows the ID before the row exists, which simplifies linking related records in one transaction.

Practical Notes and Pitfalls

  • Storage: a UUID is 16 bytes as a native UUID/binary column but 36 bytes as text — prefer the native type in Postgres or MySQL 8.
  • Index locality: random v4 values scatter across a B-tree index, which can slow huge insert-heavy tables. UUID v7 (time-ordered) addresses this; v4 remains the right default for general use.
  • Case: the canonical form is lowercase, and comparisons should be case-insensitive.
  • UUID = GUID: Microsoft's term for the same 128-bit format.

Generation runs entirely in your browser — no server ever sees or logs the identifiers, so they're safe to use directly in production data. Need random secrets rather than IDs? Use the password generator. Fingerprinting existing content instead? That's the hash generator.

Frequently Asked Questions

What is a UUID?
A 128-bit identifier written as 32 hex digits (8-4-4-4-12 pattern). Version 4 UUIDs contain 122 random bits, giving about 5.3 × 10³⁶ possible values — unique in practice without any central coordination.
Are these UUIDs truly unique?
Statistically, yes. You would need to generate about a billion UUIDs per second for 85 years to reach even a 50 % chance of one collision. Every ID here comes from a cryptographically secure random source.
Can I generate multiple UUIDs at once?
Yes — set the count (1 to 50), click Generate, and use Copy All to grab the whole batch, one UUID per line, for seed scripts or spreadsheets.
Why does the third group always start with 4?
That digit is the version field — 4 means "randomly generated". The first character of the fourth group is always 8, 9, a, or b, which encodes the UUID variant. The remaining 122 bits are random.
Should I use UUIDs as database primary keys?
They are excellent for distributed systems and non-guessable references. Store them in a native UUID/binary column (16 bytes, not 36-byte text), and for extremely insert-heavy tables consider time-ordered UUID v7 for better index locality.