What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit ID written as 32 hexadecimal digits in the familiar 8-4-4-4-12 shape, for example 6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b. It is designed to be unique across space and time without any central registry — two servers on opposite sides of the planet can mint IDs independently and never collide. That makes UUIDs the default choice for database primary keys, distributed systems, session tokens, order IDs and file names.

v4 vs v7 — which version should you use?

v4 — Randomv7 — Time-ordered
How it works122 bits of pure randomness48-bit millisecond timestamp + 74 random bits
Sortable?No — random orderYes — sorts by creation time
Best forTokens, session IDs, anything where you want zero time information leakedDatabase primary keys (PostgreSQL/MySQL index-friendly), event IDs, logs
PrivacyReveals nothingReveals approximate creation time
Rule of thumb: reaching for a database primary key? Pick v7 — sequential inserts keep your B-tree index compact instead of fragmenting it the way random v4 keys do. Need an unguessable token or just a plain unique ID? v4 is the safe default.

Why bulk generation matters

Seeding a test database, generating fixture data, or migrating a table to UUID keys means you need hundreds of IDs at once — not one at a time. Generate the batch here, then export it:

  • .txt — one UUID per line, ready for scripts and config files.
  • .json — a JSON array, ready to paste into seed files or API payloads.
  • .sql — an INSERT statement skeleton for a table with an id column.

Formats: uppercase, compact and braces

Different platforms insist on different shapes: Windows/.NET tooling often expects {braces} and UPPERCASE, URLs prefer the compact 32-character no-hyphen form, and most APIs accept plain lowercase. The format options above cover all three — pick once, generate, done.

Private by design

UUIDs frequently end up as primary keys, API tokens and correlation IDs inside databases and logs. This generator uses your browser's cryptographic random source (crypto.getRandomValues) and never sends anything to a server — your IDs never transit a third party.