~ / developer / uuid-generator

🆔 UUID Generator

Creates UUID v4 and time-sortable v7 with your browser's cryptographically secure random generator. Up to 1,000 at a time, in whatever format you need.

UUID
-
options
Version
UUIDs
Format
Separator
output
UUID inspector — version & timestamp

How to use the UUID generator

  1. Pick a version. Use v4 unless you have a reason not to; use v7 when IDs should sort in creation order, such as database primary keys.
  2. Type a count or tap a quick button (1 · 10 · 50 · 100 · 1000) and the UUIDs are generated instantly. Every click on ↻ regenerate produces fresh values.
  3. Uppercase, no hyphens, braces and the separator (new line, comma, JSON array, SQL IN (…)) only change how the same values are written. copy all grabs the whole list.
  4. Paste any UUID into the UUID inspector to see its version — and, for v1, v6 and v7, when it was created.

What is a UUID?

A UUID (Universally Unique Identifier — Microsoft calls it a GUID) is a 128-bit identifier written like 550e8400-e29b-41d4-a716-446655440000. The point is that anyone can generate one independently, without asking a central server for "the next number," and still practically never collide. It's 32 hex digits in 8-4-4-4-12 groups; the first digit of the third group is the version, and the first digit of the fourth group (8, 9, a or b) marks the variant. The current standard is RFC 9562 (2024), which replaced RFC 4122.

UUID v4 vs. v7

UUID v4UUID v7
Made of122 random bits48-bit Unix milliseconds + 74 random bits
Sort orderRandomCreation time
Reveals creation timeNoYes, from the first 12 hex digits
As a DB primary keyFragments B-tree indexesSequential inserts — index friendly
Good forTokens, public IDs, general identifiersPrimary keys, log and event IDs

Because v4 is fully random, new rows land all over a B-tree index (MySQL InnoDB, PostgreSQL, SQL Server), causing page splits and cache misses. v7 starts with a timestamp, so new values always append near the end — you get insert performance close to an auto-increment integer while still generating IDs independently across services.

How they're generated, and collision odds

Even if you generate a billion v4 UUIDs, the chance of any duplicate is around 10-19 — effectively zero. By the birthday bound you'd need about 2.7×1018 UUIDs for a 50% chance of one collision.

Format examples

OptionOutputTypical use
default3f2b8c1e-9d4a-4e6b-8a7c-1d2e3f4a5b6cMost APIs, PostgreSQL uuid
UPPERCASE + braces{3F2B8C1E-9D4A-4E6B-8A7C-1D2E3F4A5B6C}.NET / Windows registry GUIDs
no hyphens3f2b8c1e9d4a4e6b8a7c1d2e3f4a5b6cCompact keys, filenames
SQL IN (…)IN ('…', '…')Pasting into a WHERE clause

v7 embeds its creation time, so don't use it for IDs you publish where the timestamp would leak something (like when an account was created) — use v4 there. UUIDs are hard to guess but aren't designed to replace passwords or auth tokens. All generation happens in your browser; nothing is logged on a server.

FAQ

Is a UUID the same as a GUID?
Yes, it is the same 128-bit identifier. Microsoft calls it a GUID and often writes it uppercase inside braces {…}. Turn on UPPERCASE and braces to get that format.
Which databases support UUID v7?
Any database that stores UUIDs can store v7 (PostgreSQL uuid, MySQL BINARY(16) or CHAR(36), SQL Server uniqueidentifier). PostgreSQL 18 adds a built-in uuidv7() function.
Is a UUID without hyphens still the same UUID?
Yes. Hyphens are only for readability; the 32 hex digits are the value. To save space, store UUIDs as 16-byte binary instead of a 36-character string.
Can two UUIDs ever be the same?
In theory yes, but with v4 the odds are effectively zero even after billions of IDs. The real risk is a weak random number generator, so use implementations backed by a cryptographic RNG like this one.
Should I use UUID v4 or v7?
Use v7 for database primary keys and anything you want sorted by creation time. Use v4 for public-facing IDs and tokens where you do not want to reveal when they were made.

Related tools