UUID Generator (v4 & v7) and Validator

Create up to 1,000 UUIDs at once — random v4 or sortable v7 — and inspect any UUID to see its version, variant and embedded timestamp.

Loading tool…

About the UUID Generator

A UUID is a 128-bit identifier written as 32 hex digits in the pattern 8-4-4-4-12. Version 4 contains 122 random bits (six bits are fixed for version and variant); this page uses crypto.randomUUID(). With 2122 possible values, you would need to generate about a billion per second for 85 years to reach a 50% chance of a single collision.

Version 7, defined in RFC 9562 (2024), starts with a 48-bit Unix timestamp in milliseconds, followed by the version, 12 bits used here as a monotonic counter within the same millisecond, the variant and 62 random bits. v7 values sort by creation time, which keeps database B-tree indexes compact and inserts fast, while remaining unguessable enough for most IDs. The timestamp is visible, so do not use v7 where creation time must stay private.

The validator accepts plain, braced ({…}, Microsoft GUID style), hyphen-less and urn:uuid: forms. It reports the version (1–8), the variant, and decodes the timestamp from v1, v6 and v7 UUIDs. The NIL UUID (all zeros) and Max UUID (all f) are recognised as the special values defined by the RFC.

How to use it

  1. Choose v4 (random) or v7 (time-ordered).
  2. Set the count and formatting options.
  3. Click Generate, then Copy all or Download.
  4. Paste any UUID into the validator to inspect it.

Frequently asked questions

Should I use UUID v4 or v7 as a database primary key?
v7 is usually better: because values increase over time, inserts go to the end of the index instead of random pages, reducing fragmentation. v4 is better if IDs must not reveal creation time.
Is a GUID the same as a UUID?
Yes. GUID is Microsoft's name for the same 128-bit format, often written in upper case with braces.
What is the NIL UUID?
00000000-0000-0000-0000-000000000000, a special value meaning “no UUID”. It is valid syntax but should never identify a real record.
Can UUIDs collide?
In practice, no, as long as they come from a secure random source. Collisions reported in the wild come from bad generators or copied IDs.

Related tools