Search DevTools

Jump to any tool or page

UUID Generator

Generate UUIDs (v1/v4/v5), ULID, KSUID, and NanoID — single or in bulk, formatted, and exportable.

Options

Generated

No batch yet — generate one from the options pane.

About this UUID/ID generator

This tool generates unique identifiers (UUIDs, ULIDs, NanoIDs, KSUIDs) that can be used in databases, APIs, distributed systems, or anywhere you need guaranteed uniqueness. It supports both synchronous generation and background generation with a Web Worker, so large batches of IDs won’t freeze your UI.

Supported ID types

  • UUID v1 – includes timestamp + random node data.
  • UUID v4 – purely random 128-bit identifier.
  • UUID v5 – name-based UUID using SHA-1 hashing.
  • ULID – sortable unique IDs with timestamp + randomness.
  • NanoID – URL-friendly short unique strings.
  • KSUID – time-sortable 27-char unique identifiers.

Batch generation: you can generate multiple IDs at once. When using the worker option, progress is shown as IDs are created. This ensures the main thread remains responsive even when generating thousands of identifiers.

Extra features

  • Add prefix or suffix to customize IDs.
  • Toggle uppercase or remove dashes for compact formats.
  • Quick actions: copy to clipboard, generate QR codes, or reset history.

Why Web Workers? Normally, generating thousands of UUIDs can block the UI. By moving the heavy lifting into a Web Worker, this tool offloads the work to a background thread. That means smooth UI updates, live progress tracking, and better performance for large batches.

Tip: UUID v4 is best for general randomness, UUID v5 when you need deterministic results from the same input, and ULID/KSUID when you want IDs that sort nicely by time.

Developer Utilities

About UUID Generator

Generate UUIDs for database keys, request identifiers, and distributed systems that need collision-free identifiers without a central coordinator. Version 4 UUIDs draw 122 bits from a cryptographically secure random source in your browser.

Frequently asked questions

What is the difference between UUID v1, v4, and v7?
v1 derives from timestamp and MAC address, making it sortable but leaking the host identity and creation time. v4 is 122 random bits — the common default, private and unpredictable, but random ordering. v7, standardised in RFC 9562, prefixes a Unix millisecond timestamp to random bits, giving time-sortable identifiers without the privacy cost of v1. For new systems using UUIDs as primary keys, v7 is usually the better choice.
Can two UUIDs ever collide?
Possible in principle, negligible in practice. With 122 random bits, generating a billion v4 UUIDs per second for a century leaves collision probability far below the odds of a hardware failure corrupting the value. The real-world risk is not the mathematics but poor entropy — a weak or improperly seeded random source, as in some embedded environments or older language runtimes, can produce genuine repeats.
Are UUIDs a good primary key in a database?
They carry a real cost with v4. Random values scatter inserts across a B-tree index instead of appending at the end, causing page splits, index fragmentation, and a larger working set — noticeably slower than sequential integers on write-heavy tables, especially with InnoDB's clustered primary key. They also consume 16 bytes against 4 or 8, inflating every secondary index. Time-ordered UUID v7 or ULID restores insert locality while keeping decentralised generation.
Are UUIDs safe to expose in public URLs?
Version 4 generally is, since it reveals nothing about creation time, sequence, or record count — unlike sequential integers, which let anyone enumerate your records and infer growth rate. Version 1 is not, because it embeds a timestamp and MAC address. Note that unguessability is not authorisation: an unguessable identifier still needs a permission check, since it may leak through logs, referrer headers, or shared links.
What do the version and variant digits mean?
In the canonical 8-4-4-4-12 form, the first character of the third group is the version, so a v4 UUID always shows 4 there. The first character of the fourth group encodes the variant and is 8, 9, a, or b for the standard RFC layout. These fixed bits are why a v4 UUID carries 122 random bits rather than 128, and they let you identify a UUID's version by inspection.