viewer.csslab.dev

UUID Generator

Generate v4 or time-ordered v7 UUIDs in bulk, and read the version out of an existing one.

What is a UUID?

A UUID is a 128-bit identifier written as 32 hexadecimal digits in an 8-4-4-4-12 pattern. Its point is that anyone can mint one without asking a central authority and still be safe from collisions, which is what makes it useful for database keys, request identifiers, and file names generated on many machines at once.

This generator produces version 4 UUIDs, which are entirely random, and version 7 UUIDs, whose first 48 bits are a millisecond timestamp so that values sort by creation time. It can also read an existing UUID and tell you its version and variant.

UUIDs are 128 bits long and are intended to guarantee uniqueness across space and time.
RFC 9562 §1

Features

v4 and v7
Version 4 is random and the usual default. Version 7 is time-ordered, which keeps database indexes compact — random keys scatter B-tree inserts across the whole index, and that cost shows up as write amplification on large tables.
Bulk generation
Generate 1, 5, 10, or 50 at a time and copy the whole list in one click, for seeding fixtures or filling a test table.
Formatting options
Uppercase and hyphen-free variants for systems that store UUIDs as a plain 32-character string.
Inspect an existing UUID
Paste any UUID to read its version and variant, and — for v7 — the timestamp embedded in its first six bytes.
Cryptographically random
Values come from the browser's crypto.randomUUID() and crypto.getRandomValues(), not Math.random(), so they are unpredictable as well as unique.

How to use

  1. 1

    Pick a version

    v4 for a plain random identifier, v7 when you want the values to sort by creation time.

  2. 2

    Choose how many

    Generate one or up to fifty at a time.

  3. 3

    Adjust the format

    Switch to uppercase or drop the hyphens if the target system stores UUIDs that way.

  4. 4

    Copy them

    Copy all copies the whole list, one per line.

Frequently asked questions

What is the difference between UUID v4 and v7?

v4 is 122 random bits, so two v4 values have no relationship to each other or to time. v7 puts a 48-bit millisecond timestamp in front of the random part, so values generated later sort after earlier ones. Use v7 when the UUID will be a primary key or will be sorted; use v4 when ordering would leak information you would rather not expose.

Can two UUIDs ever collide?

In principle yes, in practice no for v4: with 122 random bits you would need to generate roughly 2.7 × 10^18 of them before a 50% chance of a single collision. The real risk is not the mathematics but a weak random source — which is why this tool uses the browser's cryptographic generator rather than Math.random().

Is a GUID the same as a UUID?

Yes, in practice. GUID is Microsoft's name for the same 128-bit identifier. Some older Microsoft tooling prints it in braces or mixed case and uses a different byte order internally, but the value format is the same.

Should I use a UUID as a database primary key?

It is a reasonable choice when identifiers must be generated outside the database or merged across systems, but a random v4 key fragments the index because each insert lands in a different page. If that matters, use v7 — it keeps inserts sequential while remaining globally unique.

Are these UUIDs generated on a server?

No. They are generated in your browser by the Web Crypto API and never transmitted, so no one — including this site — has seen the values you copy.

Specifications this follows

Related tools