UUID Generator & Validator

Generate UUID v4 or v7 and validate UUIDs with version and variant detection.

1
UUIDs: 0
Mode
UUID version

Generates version 4 (random) or version 7 (time-ordered) UUIDs, up to 1,000 at a time, and checks whether a string is a well-formed UUID of any version, reading the time inside versions 1, 6 and 7.

Generation and validation run in your browser; nothing you generate or paste is sent anywhere.

How to use it

  • Generate — pick the version and how many (1 to 1,000). Uppercase and Remove hyphens change the format only. Regenerate makes a new batch; Copy copies all of them, one per line.
  • Validate — paste one UUID. The result shows whether it is valid, with its version and variant, the time it was made for versions 1, 6 and 7, in UTC, and its standard lowercase, hyphenated form; or the first problem found.

The validator accepts the hyphenated form or 32 digits without hyphens, in either case, optionally in braces or after urn:uuid:. The nil UUID (all zeros) and max UUID (all f) are valid and have no version. UUIDs of other variants, such as Microsoft's reserved one, are valid without a version; for the RFC 9562 variant, versions 0 and 9 to 15 are undefined and reported as invalid.

Version 4 or version 7

Version 4 is 122 random bits from your browser's cryptographically secure generator; the rest mark the version and variant.

Version 7, defined in RFC 9562, starts with the creation time in milliseconds, followed by a 12-bit counter that keeps UUIDs made in the same millisecond in order, then 62 random bits. Sorting version 7 UUIDs sorts them by creation time, which keeps database indexes compact.

Use version 7 for database keys and anything you sort; use version 4 when an ID must not reveal when it was made.

Examples

Validating a UUID in braces

UUID
{550E8400-E29B-41D4-A716-446655440000}
Version
4 (random)
Variant
RFC 9562
Standard form
550e8400-e29b-41d4-a716-446655440000

Uppercase without hyphens

UUID
550e8400-e29b-41d4-a716-446655440000
Formatted
550E8400E29B41D4A716446655440000

The same identifier, 32 characters instead of 36.

UUID versions

The RFC 9562 examples, read by the validator
ExampleVersionKindCreated (UTC)
c232ab00-9414-11ec-b3c8-9f6bdeced8461time-based22 February 2022, 19:22:22 UTC
5df41881-3aed-3515-88a7-2f4a814cf09e3name-based, MD5—
919108f7-52d1-4320-9bac-f847db4148a84random—
2ed6657d-e927-568b-95e1-2665a8aea6a25name-based, SHA-1—
1ec9414c-232a-6b00-b3c8-9f6bdeced8466reordered time22 February 2022, 19:22:22 UTC
017f22e2-79b0-7cc3-98c4-dc0c0c07398f7Unix time22 February 2022, 19:22:22 UTC
2489e9ad-2ee2-8e00-8ec9-32d5f69181c08custom—

Frequently asked questions

In practice, no. With 122 random bits, a duplicate version 4 UUID becomes likely only after generating billions every second for decades. Version 7 adds the timestamp, so duplicates would also need the same millisecond.
No. Validation checks the format, version and variant; it cannot know whether the same UUID exists elsewhere.
Some systems store UUIDs as 32 hexadecimal characters. The value is identical; only the separators are gone.

See also