UUID v4 Generator Online

Generate random UUID v4 values

Como usar UUID Generator

  1. 1

    Click Generate

    A new cryptographically random UUID v4 is created instantly.

  2. 2

    Generate in bulk

    Set the quantity to generate multiple UUIDs at once for test data.

  3. 3

    Copy UUIDs

    Click copy to grab one UUID or all generated UUIDs as a list.

Perguntas frequentes

Is my data safe?
Yes. All processing happens entirely in your browser. Your data never leaves your device and is never uploaded to any server.
Are these UUIDs truly random?
Yes. They are generated using the Web Crypto API (crypto.randomUUID or crypto.getRandomValues), which provides cryptographically secure randomness. These UUIDs are safe to use as secure identifiers, unlike UUIDs generated with Math.random() which are not cryptographically strong.
What is the difference between dev/uuid and generate/uuid?
Both tools generate the same standard UUID v4 format. The dev/uuid page is presented in the developer tools section with a focus on API integration, bulk generation, and developer workflows. The generate/uuid page targets general users who need a quick one-off UUID.
Can two generated UUIDs ever be the same?
In theory yes, but in practice no. The probability of generating a duplicate UUID is approximately 1 in 2^122 — about 1 in 5 undecillion. You would need to generate billions of UUIDs per second for millions of years before expecting a collision.
Should I use UUID v4 or UUID v7 for database primary keys?
UUID v4 is completely random, which can cause index fragmentation in B-tree databases like PostgreSQL. UUID v7 (time-ordered) is better for database primary keys because it maintains insertion order. Use v4 for general unique identifiers and v7 for database row IDs when performance matters.

Saiba mais

O que é UUID Generator?

Generate cryptographically random UUID v4 values instantly for use in databases, distributed systems, APIs, and automated tests. Create one at a time or generate dozens in bulk for test fixtures and seed data. Uses crypto.randomUUID() from the Web Crypto API — the same randomness source used in TLS handshakes. Outputs in the standard xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx format, ready to paste directly into SQL inserts, JSON payloads, or code. No server, no sign-up, no limits.

Por que usar UUID Generator?

  • Cryptographically secure — uses crypto.randomUUID() or crypto.getRandomValues(), not Math.random(), so UUIDs are suitable for use as secure identifiers.
  • Bulk generation — create dozens of UUIDs at once for populating test fixtures, database seeds, or mock data sets.
  • Developer-focused format — outputs in standard hyphenated format (8-4-4-4-12) ready for direct use in code.
  • Instant — generation completes in microseconds. Copy and paste into your IDE without interrupting your workflow.
  • Completely private — UUIDs are generated locally. No server logs your generated identifiers.

Casos de uso de UUID Generator

Database primary keys

Generate UUIDs to use as primary keys when inserting records into PostgreSQL, MySQL, or DynamoDB tables during development or testing.

Test fixture data

Create batches of unique UUIDs for populating test databases, mock API responses, or JSON fixture files used by automated test suites.

API request IDs

Generate unique request correlation IDs to include in API calls for tracing and debugging distributed system requests.

Idempotency keys

Create idempotency keys for payment APIs (Stripe, PayPal) to safely retry requests without risking duplicate charges.

Dicas e boas práticas

  • 💡In PostgreSQL, use the uuid-ossp extension's uuid_generate_v4() or the built-in gen_random_uuid() for server-side UUID generation in production.
  • 💡UUIDs are globally unique without coordination — no need for a central ID server. This makes them ideal for distributed systems and client-side ID generation.
  • 💡For URL slugs or short identifiers, consider using only a portion of the UUID (e.g., the first 8 characters) or a dedicated short ID library instead.
  • 💡Uppercase and lowercase UUID representations are equivalent — 'A3F4...' and 'a3f4...' are the same UUID. Most databases normalize to lowercase.

Como funciona

UUIDs are generated using crypto.randomUUID() where supported (Chrome 92+, Firefox 95+, Safari 15.4+), falling back to crypto.getRandomValues() for older browsers. The fallback manually constructs the UUID v4 format by generating 16 random bytes and setting bits 12-15 of byte 6 to 0100 (version 4) and bits 6-7 of byte 8 to 10 (variant 1), per RFC 4122. The result is formatted as the standard 8-4-4-4-12 hyphenated hex string. Collision probability is approximately 1 in 2^122, making collisions effectively impossible in any realistic use case.