UUID Generator

Version

v7 includes a timestamp for time-based ordering.

Generated on your device. Never stored.

Two versions.
One familiar format.

Generate UUID v4 or v7 identifiers locally in your browser. Choose a version, copy the result and get back to work.

How to generate a UUID

  1. Choose v4 for random identifiers or v7 for identifiers that include a timestamp. The default is v7.
  2. Click the UUID to copy it.
  3. Select “Generate again” for another identifier. Previous results are not saved.

UUID v4 vs v7

v4 · Random
Uses random values without an embedded timestamp. Choose it when you need a random identifier and do not need time-based ordering.
v7 · Time-based
Includes a Unix timestamp in milliseconds alongside random values. Choose it when the timestamp is useful for ordering. This generator does not guarantee generation order within the same millisecond or when the device clock moves backwards.

Both use the familiar 36-character representation: hexadecimal digits in groups of 8–4–4–4–12, separated by hyphens. See RFC 9562 for the UUID specification.

How each UUID is built

A v4 UUID sets 6 bits for its version and variant and fills the other 122 bits with secure random values from your browser. A v7 UUID stores the current Unix time in milliseconds in its first 48 bits, then the version and variant bits, then 74 random bits. Both are written as lowercase hexadecimal.

Common questions

What is the difference between UUID v4 and v7?

v4 is random apart from its version and variant bits. v7 starts with a Unix timestamp in milliseconds, so UUIDs created later usually sort after earlier ones. Choose v7 when ordering by creation time helps, and v4 when you do not want to reveal when an identifier was created: anyone with a v7 UUID can read its timestamp, which comes from your device’s clock.

How likely is a duplicate UUID?

Extremely unlikely. A v4 UUID has 122 random bits: you would need to generate about 2.7 × 1018 of them for a 50% chance of a single duplicate. A v7 UUID has 74 random bits, and two can only collide if they were created in the same millisecond. This tool does not check a registry, so enforce uniqueness where you store identifiers.

Can I use a UUID as a database primary key?

Yes, and many databases do. Random v4 keys land at scattered positions in an index, which can slow inserts on large tables; time-ordered v7 keys are added near the end and usually index better. Where your database supports it, store them in a native UUID type or a 16-byte binary column instead of a 36-character string.

Should UUIDs be uppercase or lowercase, with or without hyphens?

This tool outputs lowercase hexadecimal with hyphens, the standard form described in RFC 9562. UUIDs are not case-sensitive, so an uppercase version is the same value, and many systems also accept them without hyphens. Check the format your system expects; this tool does not offer other formats.

Are generated UUIDs sent to DSOOU?

No. Generation happens in your browser using secure random values, and DSOOU does not upload or save the results. UUIDs identify records; they are not secrets, so do not use one as a password.