Developer Tools

UUID Generator & Validator

Generate, validate and inspect UUID v4 and UUID v7 values in your browser.

  • Runs in your browser
  • No upload required
  • Free, no signup

A version 4 UUID is 122 random bits. Nothing about it is predictable, which is what you want for identifiers that must not be guessable.

Your data is processed locally in your browser and is not uploaded to our server.

A UUID is a 128-bit identifier designed to be unique without a central authority handing out numbers. This page generates version 4 and version 7 UUIDs, produces them in bulk, checks whether a string is a valid UUID, and reads a UUID apart so you can see its version, its variant and — where the version carries one — the moment it was created.

Generation uses the browser’s cryptographic random number generator, not Math.random. Nothing is sent anywhere: every value is produced on your device, which is the only way an identifier for a private database row should be made.

How to use this tool

  1. Pick the tab for what you need: version 4 for random identifiers, version 7 for identifiers that sort by creation time, Bulk for a list, Validate to check a string, or Inspect to decode one.
  2. Press Generate. The value appears immediately and you can copy it with the Copy button.
  3. For a batch, set the quantity and the version, then generate. Copy the whole list, or download it as a text file or a CSV.
  4. To check a UUID someone sent you, paste it into Validate. To find out when it was made, paste it into Inspect.

UUID v4 Generator

Version 4 is the UUID most people mean when they say "random UUID". 122 of its 128 bits are random, and the remaining six are fixed: four identify the version, two identify the variant. There is no embedded timestamp, no machine identifier and no structure beyond that.

Because the value carries no meaning, it is safe to publish without revealing when a record was created or how many records exist. That is also its drawback: v4 values are scattered across the whole keyspace, so inserting them into a database index in random order is measurably slower than inserting ordered keys.

UUID v7 Generator

Version 7, standardised in RFC 9562, puts a 48-bit Unix timestamp in milliseconds first, then 62 random bits after it, with 12 bits between them reserved as a field the specification allows a generator to use as a counter. Two consequences follow. First, the values sort lexicographically into the order they were created. Second, anyone holding the UUID can read the creation time out of it.

That first property is why v7 exists. A v7 primary key is generated on the client, needs no database round trip to obtain, and still inserts at the end of the index like an auto-incrementing integer would — which avoids the page splits that random v4 keys cause on a large table.

It is worth being precise about the trade-off rather than treating v7 as strictly better: it is not. You give up 60 bits of randomness in exchange for ordering, and you give up the privacy of a timestamp-free identifier. This generator uses that 12-bit field as a counter, so values created in the same millisecond stay in order — the pattern RFC 9562 sets out for exactly this purpose.

Version 7 is ordered, but it is not a sequence. Two UUIDs from the same millisecond differ only in their counter and random bits, and the counter is guessable by anyone who can see one of them.

Bulk UUID Generator

Generate up to 1 000 UUIDs at once and take them away as plain text or CSV. This is the practical route for seeding a fixture file or filling a test database.

  • Choose version 4 for fully random values, or version 7 for a list that is already in creation order.
  • A version 7 batch comes out genuinely sorted: the generator keeps a counter for values created within the same millisecond, rather than leaving them in random order relative to each other.
  • Copy the list straight to the clipboard, or download it as .txt or .csv.

UUID Validator

Paste a string and the validator reports whether it is a well-formed UUID. Four representations are accepted, because all four turn up in real systems: the canonical hyphenated form, 32 hexadecimal characters with no hyphens, the braced GUID form, and the URN form prefixed with urn:uuid:.

Validation here is structural — it confirms the shape and the hexadecimal content. It also reports the version and variant that the value declares, which catches the common case of a string that is shaped like a UUID but was never generated by anything that followed the specification.

A valid UUID is not necessarily a unique one. A value can be correctly formed and still collide with another if it came from a broken generator.

UUID Version and Variant Inspector

The inspector reads the fixed fields inside a UUID. The version is the first hexadecimal digit of the third group, and the variant is encoded in the leading bits of the fourth group. Together they tell you what kind of UUID you are looking at and how many random bits it carries.

For versions 1, 6 and 7 the inspector also decodes the embedded timestamp and shows it as a date. Version 1 and version 6 store a count of 100-nanosecond intervals since 15 October 1582, the start of the Gregorian calendar; version 7 stores Unix milliseconds. Versions 3, 4, 5 and 8 contain no time at all, and the page says so rather than guessing.

  • Version 1 — time-based, with a node identifier.
  • Version 3 — name-based using MD5, reproducible from a namespace and a name.
  • Version 4 — 122 random bits.
  • Version 5 — name-based using SHA-1.
  • Version 6 — the v1 fields reordered so the value sorts by time.
  • Version 7 — Unix milliseconds followed by random data.
  • Version 8 — custom layout, defined by whatever produced it.

Frequently asked questions

What is a UUID?

A universally unique identifier: a 128-bit number written as 32 hexadecimal digits in five hyphen-separated groups, such as 9f1b2c3d-4e5f-4a6b-8c9d-0e1f2a3b4c5d. It is designed so that independent systems can each generate identifiers without coordinating and still not collide in practice. 128 bits is enough that the chance of a random collision is negligible even across billions of values.

What is UUID v4?

Version 4 is a UUID whose payload is random. Six bits are reserved — four for the version and two for the variant — leaving 122 random bits, and nothing in the value is derived from the time, the machine or the data it identifies. It is the default choice when you simply need an unguessable identifier.

What is UUID v7?

Version 7 is a time-ordered UUID from RFC 9562. It begins with a 48-bit Unix timestamp in milliseconds, then carries 74 random bits. Because the time comes first, v7 values sort into creation order, which makes them a good fit for database primary keys. The trade-off is that the creation time is readable by anyone who has the value.

What is the difference between UUID v4 and UUID v7?

Version 4 is entirely random and carries no timestamp; version 7 leads with the current time so that values sort chronologically. If you need identifiers that cannot be traced to a moment in time, use v4. If you need client-generated keys that insert efficiently into an index and sort by creation, use v7 — and accept that the timestamp is public.

How do I validate a UUID?

Paste it into the Validate tab. A UUID must be exactly 32 hexadecimal digits, optionally grouped as 8-4-4-4-12, optionally wrapped in braces or prefixed with urn:uuid:. The validator accepts all four forms and also reports the version and variant, so a string that is shaped correctly but declares an impossible version is easy to spot.

Are UUIDs unique?

They are statistically unique, not unique by construction. A version 4 UUID has 122 random bits, so generating a billion of them still leaves the chance of any collision at roughly one in ten trillion. The guarantee depends entirely on the random source: this tool uses the browser’s cryptographic generator, and Math.random would not be good enough for the same job.