UUID Generator

Generate universally unique identifiers (UUID v4) in bulk.

🆔

Click Generate to create UUIDs

About UUID v4 Generator

A UUID (Universally Unique Identifier) is a 128-bit identifier standardised by RFC 4122. Version 4 UUIDs are randomly generated using cryptographically secure random numbers, making the probability of collision vanishingly small even when generating millions of IDs. This generator produces UUIDs using the browser's crypto.randomUUID() or crypto.getRandomValues() API.

Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx

UUID versions explained

  • v1 — time-based. Embeds the current timestamp and MAC address. Predictable and not privacy-safe.
  • v3 / v5 — name-based. Deterministic: the same input always produces the same UUID. v3 uses MD5; v5 uses SHA-1.
  • v4 — randomly generated. The most widely used version. 122 bits of random data; no information about when or where it was generated.
  • v7 — new standard (RFC 9562). Time-ordered random UUID. Better for database index performance; sortable by creation time.

Common use cases for UUID v4

  • Database primary keys — use UUIDs instead of sequential integer IDs to avoid exposing record counts and to support distributed systems where multiple nodes generate IDs independently.
  • Session tokens — generate a unique, unguessable token for each user session or file upload.
  • API request tracing — assign a unique correlation ID to each API request for logging and debugging.
  • File naming — avoid filename collisions when storing user-uploaded files.

About the UUID Generator

A UUID (Universally Unique Identifier, also called GUID in Microsoft contexts) is a 128-bit value that serves as a globally unique identifier without coordination. UUIDs let distributed systems generate IDs independently with near-zero risk of collision — no central authority is needed. They are used as primary keys in databases, file names, distributed system request IDs, transaction IDs, and in any context where two parties need to refer to the same object without prior coordination.

This generator produces UUIDv4 (random) and UUIDv7 (time-ordered, when supported) values using cryptographically secure random bytes. You can generate one at a time or in bulk.

The different UUID versions

UUIDv1 encodes a MAC address and timestamp — useful for ordering but leaks the generating host. UUIDv4 is purely random and is overwhelmingly the most common version on the modern web. UUIDv7 (standardised in 2024) embeds a millisecond timestamp at the start of the value while keeping the rest random; it is sortable in time order while preserving uniqueness, which makes it excellent as a database primary key.

UUIDv4 collision probability

122 random bits give about 5 × 10^36 possible UUIDs. A single collision is expected only after generating around 2.7 × 10^18 UUIDs. In practice every project on Earth can generate UUIDs forever without collision, and you should treat them as effectively unique. Sequential primary keys are easier to read but have well-known downsides (predictability, exposure of cardinality); UUIDs are the standard choice when those matter.

How to use the UUID Generator

  1. Pick version and count

    Choose v4 or v7 (when offered) and how many to generate.

  2. Click generate

    Output appears immediately. Use the copy buttons to grab one or all values.

  3. Use in your application

    Paste into your database fixture, test data, configuration, or message.

Worked examples

Example 1

Input: UUIDv4, one value

Result: b3c5f0e2-3d4e-4b8a-9f12-7a6b5e4d2c1f

Standard 36-character format with hyphens at positions 8, 13, 18, 23.

Example 2

Input: UUIDv7, bulk of 10

Result: 10 sortable values, each starting with the current millisecond timestamp

v7 maintains time-order when sorted lexicographically — useful as a database primary key.

Real-world use cases

  • Generating primary keys for tables that will scale across multiple databases.
  • Creating unique file names to avoid collisions in shared storage.
  • Producing request IDs for distributed tracing.
  • Generating idempotency keys for retried API calls.
  • Producing test fixture identifiers.

Tips & common mistakes

  • UUIDs as primary keys make sequential page reads less efficient on B-tree indexes than auto-increment integers. Use UUIDv7 if you need both uniqueness and ordering.
  • Strip hyphens if you need a 32-character compact form. The information is the same.
  • For human-readable IDs (invoice numbers, ticket numbers), UUIDs are awkward. Use a sequential scheme with a public-facing format instead and keep UUIDs internal.

Frequently asked questions

What is the difference between UUID and GUID?

None functionally — GUID is Microsoft's name for the same 128-bit identifier. Format and properties are identical.

Should I worry about collisions?

No. UUIDv4 collisions are vanishingly unlikely. UUIDv7 inherits the same property because the random portion is still 74 bits.

Is the output cryptographically secure?

Yes for v4 — the random bytes come from window.crypto.getRandomValues. v7 also uses the secure RNG for its random portion.

Can two computers generate the same UUIDv4?

Statistically, no. Treat them as unique without coordination.

Related tools

Last updated: June 2026 · All processing happens locally in your browser.