UUID Generator

Generate cryptographically random UUID v4 identifiers — singly or in bulk, with uppercase and hyphen options. Everything runs in your browser.

uuid-v4 · runs locally

How this UUID generator works

Every identifier here is a version 4 UUID built from your browser’s cryptographically secure random number generator (crypto.getRandomValues). The tool takes 16 random bytes, stamps the version nibble to 4 and the variant bits to the RFC 4122 pattern, and formats the result as the familiar 8-4-4-4-12 hex string. That is exactly what libraries like Python’s uuid4() or PostgreSQL’s gen_random_uuid() do — nothing is derived from your machine, the time, or a server, and nothing leaves your browser.

Need identifiers for a seed script or test fixtures? Set the count up to 100 and you get one UUID per line, ready to paste. The uppercase and no-hyphen options cover systems that store UUIDs as plain 32-digit hex. For a deeper look at versions and collision math, see our guide What Is a UUID?

When to reach for a UUID

  • Primary keys in distributed databases, where no single sequence exists.
  • Correlation and request IDs in logs and traces across services.
  • Filenames and object-storage keys that must never clash.
  • Idempotency keys for payment and API retries.

UUIDs are unique, not secret

A v4 UUID is unguessable enough for most identifiers, but it is not a credential: it has 122 bits of randomness with a fixed, recognizable format, and it often ends up in URLs and logs. For anything meant to authenticate a user, generate a proper secret with the Password Generator instead.

Frequently asked questions

What is a UUID v4?

A UUID (universally unique identifier) is a 128-bit value written as 32 hex digits in five hyphenated groups. Version 4 fills 122 of those bits with random data — the other six encode the version and variant — so it can be generated anywhere, with no coordination, and still be effectively unique.

Can two random UUIDs collide?

In theory yes, in practice no. With 122 random bits you would need to generate about 2.7 quintillion UUIDs to reach even a 50% chance of a single collision. For any realistic workload the probability is far below that of hardware failure, which is why v4 UUIDs are trusted as globally unique.

What is the difference between UUID v4, v1 and v7?

v1 embeds a timestamp and (historically) a MAC address, which can leak information about when and where it was made. v4 is pure randomness. v7 is the newer time-ordered version: a Unix timestamp prefix followed by random bits, so values sort chronologically — a nicer fit for database indexes while staying unpredictable.

Are UUIDs safe to use as database primary keys?

Yes, and they are common for distributed systems because any node can mint keys without a central sequence. The trade-off is index locality: random v4 values insert all over a B-tree, which can hurt write performance on very large tables. If that matters, use UUID v7 or store the UUID alongside an internal sequential key.