Toolman

UUID Generator

Generate identifiers in bulk. Values come from your browser’s cryptographic random number generator and never touch a server.

Which UUID version should you use?

VersionBased onUse it when
v4122 random bitsYou just need a unique identifier and do not care about ordering. The safe default.
v748-bit millisecond timestamp + randomnessThe ID becomes a database primary key. Values sort chronologically, which keeps B-tree indexes compact.
v1Timestamp + MAC addressLegacy systems only — it can leak the generating machine's network address.
v5SHA-1 of a name inside a namespaceYou need the same input to deterministically produce the same UUID.

Why v7 matters for databases

Random v4 values are inserted at scattered positions in an index, which fragments pages and hurts write throughput on large tables. UUID v7 puts the timestamp in the most significant bits, so new rows append at the right edge of the index — the same locality an auto-increment integer gives you, without a central sequence.

Collision probability

A v4 UUID carries 122 random bits, or about 5.3 × 1036 possible values. Generating a billion UUIDs per second for a century leaves the chance of a single collision far below one in a billion — assuming a proper cryptographic random source, which is exactly what crypto.getRandomValues() provides.

Nano ID and short IDs

Nano ID packs similar collision resistance into 21 URL-friendly characters instead of 36, which is why it is popular for public-facing slugs. The 8-character short ID here is for throwaway keys and demo data only — with roughly 2.8 × 1014 combinations, collisions become likely once you pass a few million values.

Frequently asked questions

Are these UUIDs really random?

Yes. They come from crypto.getRandomValues(), the browser’s cryptographically secure random number generator — the same source used for key material — not from Math.random().

Could the server see the values I generate?

No. Generation happens entirely in your browser after the page loads, so the values are never transmitted and the tool works offline.

Is a UUID safe to expose in a URL?

A v4 UUID reveals nothing about its contents, so it is fine as an opaque identifier. It is not a substitute for authorisation, though — anyone who obtains the URL can use it.

How should I store a UUID in a database?

Use a native UUID column where one exists (PostgreSQL uuid, SQL Server uniqueidentifier) or a 16-byte binary column such as MySQL BINARY(16). Storing it as a 36-character string more than doubles the space and slows comparisons.

What is the difference between UUID v7 and ULID?

Both prefix random bits with a millisecond timestamp so values sort by creation time. ULID uses a 26-character Crockford base32 encoding; UUID v7 keeps the standard 36-character UUID format, so existing UUID columns and libraries accept it unchanged.

Related tools