UUID generator

Generate random v4 or time-sortable v7 UUIDs, one at a time or up to 1,000 at once. Paste one UUID, or a whole list, to check versions, dates, typos and duplicates.

  • Generate
  • Runs in your browser. Nothing is uploaded
019a7c3e-5b1f-7d2a-9c4e-8f6a2b1d3e5c
Space new C copy
Bulk
Inspect UUIDs

Anatomy of a UUID

A UUID is 128 bits, written as 32 hex digits in five groups: 8-4-4-4-12. Two positions tell you what kind it is:

019a7c3e-5b1f-7d2a-9c4e-8f6a2b1d3e5c
              ^    ^
              |    variant (8, 9, a or b = RFC 9562)
              version (7)

v4 vs v7

v4v7
Made from122 random bits48-bit Unix ms timestamp + 74 random bits
Sortable by timeNoYes
Database index friendlyPoor (random inserts)Great (append-only)
Reveals creation timeNoYes, to the millisecond

Checking a list of UUIDs

Paste one UUID per line into the inspector. Quotes, braces, trailing commas and urn:uuid: are ignored, so you can paste straight from JSON, SQL or a log. Each line gets its version and creation date, and problems are marked in place:

  • Look-alike letters: an O where a 0 should be, or an l for a 1. Fixed in one click.
  • Wrong group lengths: the group with a missing or extra digit is marked.
  • Missing hyphens: 32 digits with no hyphens (or hyphens in the wrong places) are re-grouped as 8-4-4-4-12.
  • Duplicates are flagged with the line they repeat.
  • Non-standard versions: usually a random 128-bit ID rather than a real UUID.

Click any line in the results to jump to it in the input.

Generating UUIDs in code

// JavaScript (browser & Node 19+)
crypto.randomUUID()                      // v4

// Python 3.14+
import uuid
uuid.uuid4(); uuid.uuid7()

// PostgreSQL 18+
SELECT uuidv7();

// macOS / Linux
uuidgen | tr A-Z a-z

Generating IDs for an API? The JWT decoder is useful for checking the tokens that carry them.

Questions people ask

Should I use UUID v4 or v7?
Use v7 for database primary keys. It starts with a timestamp, so new rows are added at the end of the index instead of all over it, which keeps inserts fast. Use v4 when you don’t want to reveal when an ID was created.
Can two UUIDs ever be the same?
In theory, yes. In practice, no. A v4 UUID has 122 random bits, so you’d need to generate about a billion per second for 86 years to have a 50% chance of a single collision.
What’s the difference between a UUID and a GUID?
Nothing meaningful. GUID is Microsoft’s name for the same 128-bit identifier. GUIDs are often written in uppercase with braces, like {6F9619FF-8B86-D011-B42D-00CF4FC964FF}, so there are toggles for both.
Why is my UUID invalid?
Usually a letter that looks like a digit (O for 0, l for 1), a digit lost while copying, or hyphens in the wrong places. Paste it into the inspector and the exact character is marked, with a one-click fix when the fix is certain.
Are these UUIDs secure?
They’re generated with crypto.getRandomValues, a cryptographically secure source, in your browser. Still, don’t use UUIDs as secret tokens: v7 leaks its creation time, and IDs tend to end up in logs and URLs.
↑↓ move↵ openesc close