Skip to content
{//}nullpath

UUID Generator

0 requests sent since load
Options

Version

Format

Quantity

Separator

output

generated

—

Output

About UUID generation

v4 UUIDs are generated using crypto.randomUUID() — the browser's cryptographically secure random number generator — so they are suitable for use as database primary keys, idempotency tokens, or any context requiring globally unique identifiers. v7 UUIDs embed a millisecond-precision Unix timestamp in the first 48 bits, making them monotonically increasing and index-friendly in time-ordered databases.

When to use it

Reach for UUIDs whenever you need an identifier that must be unique without coordination: primary keys in distributed systems, idempotency keys for payment or webhook retries, event and trace correlation IDs, cache keys, or client-generated IDs for resources that do not yet exist server-side. Because values are generated locally, you can mint them on the client without a round-trip.

Choose v4 when randomness is all you need and records are rarely inserted in bursts. Choose v7 when rows arrive roughly in time order — databases such as PostgreSQL and MySQL index new rows adjacent to recent ones, which reduces page splits and keeps the working set hot.

Edge cases and limitations

UUIDs are astronomically unlikely to collide, but "unlikely" is not "impossible" — treat uniqueness as a strong assumption, not an absolute guarantee. They are identifiers, not secrets: a v4 UUID exposes no data, but it is also not a substitute for a cryptographic token or a signed credential. v7 timestamps come from Date.now(), so two v7 UUIDs generated within the same millisecond are not strictly ordered relative to each other. Format options (uppercase, no dashes, braces, URN) change presentation only — the underlying 128-bit value is identical.

Example

A v4 UUID looks like 1f7a9c3e-6d2b-4a01-9c65-3e1a2b4c5d6e(version nibble 4 in the third group). A v7 UUID begins with the milliseconds-since-epoch encoded as hex, so later values sort after earlier ones.

Related tools

Drop generated UUIDs straight into the JSON formatterto build a valid payload, or compare two identifier lists with the JSON difftool. If you need a shorter, URL-safe token, the Base64 encodershows the difference between the two encodings.

FAQ

Are these UUIDs truly random?

v4 UUIDs use crypto.randomUUID() which is backed by the OS CSPRNG — the same source used for TLS key generation.

Is anything sent to a server?

No. All generation happens in your browser. The UUIDs never leave this tab.