Skip to content
AdeptBay

How to use the UUID Generator

Last verified 2026-08-08 · about 6 minutes to read

The short version

  • 1.Pick a format. v4 for general use. v7 or ULID if these will be database primary keys.
  • 2.Choose how many. Up to 500 at a time. Each one is generated independently.
  • 3.Copy or download. One per line, ready to paste into a seed file or a spreadsheet.

Why this is worth getting right

Four identifier formats, all drawn from crypto.getRandomValues. UUID v7 and ULID are included because the common advice to "just use a UUID" is wrong for a database primary key: random v4 values fragment a B-tree index, while time-ordered values append cleanly. The comparison below is the decision most people actually need to make.

Method 1 — use the UUID Generator on this site

The fastest route. It runs entirely in your browser, so nothing is uploaded and there is no queue to wait in. No account is needed and there is no daily limit.

  1. Pick a format. v4 for general use. v7 or ULID if these will be database primary keys.
  2. Choose how many. Up to 500 at a time. Each one is generated independently.
  3. Copy or download. One per line, ready to paste into a seed file or a spreadsheet.

Open the UUID Generator

Method 2 — do it without this site

Worth knowing, because a tool you cannot replace is a dependency rather than a convenience. Most tasks in the developer division have a command-line or built-in equivalent; it is usually more setup and less convenient, but it works offline and it is scriptable, which matters once you are doing something a hundred times instead of once.

What this tool will not do

Every tool has an edge. These are ours for uuid generator, stated up front so you find out here rather than halfway through a deadline:

  • UUID v7 embeds a creation timestamp to the millisecond. Do not use it where that leaks something.
  • Generation is per-call, so two values created in the same millisecond are ordered only by their random suffix.

Questions people ask

What is the difference between UUID v4 and UUID v7?

v4 is 122 random bits. v7 puts a 48-bit millisecond timestamp at the front and fills the rest with randomness, so v7 values sort by creation time. Both are standardised in RFC 9562 and both are unique in practice.

Which one should I use for a database primary key?

v7 or ULID. Random v4 values scatter inserts across a B-tree index, causing page splits and index fragmentation that measurably slows write-heavy tables. Time-ordered identifiers append at the end of the index instead.

What is a ULID and how is it different from UUID v7?

Both encode a timestamp then randomness. ULID uses Crockford base32, so it is 26 characters instead of 36, case-insensitive, and excludes I, L, O and U to avoid transcription errors. UUID v7 has the advantage of being a real UUID that a database UUID column accepts directly.

Are these actually random?

They come from crypto.getRandomValues, the browser's cryptographically secure random source. Math.random is never used, because its output is predictable from a handful of observed values — fine for shuffling a playlist, not for an identifier that might guard a resource.

What is the chance of a collision?

For UUID v4, you would need roughly 2.7 × 10^18 values before reaching a one-in-a-billion chance of a single collision. Generating a billion per second, that is about 85 years. Collision is not a practical concern.

Can a UUID be guessed?

A v4 from a secure random source, no. But a UUID is not an access control mechanism — anyone who learns the value has it forever, and they often end up in logs, referrer headers and browser history. Use one as an identifier, not as a secret.

Open the UUID GeneratorUUID v4, UUID v7, ULID and NanoID — generated in your browser.