UUID generator

Generate cryptographically random UUID v4 identifiers. Bulk generate up to 100 at once.

Click Generate to create UUIDs

How UUIDs are generated

A UUID (Universally Unique Identifier) is a 128-bit identifier formatted as 32 hexadecimal digits in the pattern xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx, where M is the version and N is the variant. This tool generates version 4 UUIDs using the browser's crypto.randomUUID() API, which uses a cryptographically secure pseudorandom number generator (CSPRNG).

UUID v4 has 122 bits of randomness (6 bits are fixed for version and variant markers). The probability of two randomly generated UUIDs colliding is astronomically small: you would need to generate approximately 2.7 × 1018 UUIDs before reaching a 50% chance of a single collision. In practice, UUIDs are safe to treat as globally unique without any central coordination. They are widely used as primary keys in databases, filenames, session tokens, idempotency keys, and anywhere a unique identifier is needed without a central authority to issue sequential IDs.

Frequently asked questions

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit identifier standardised as RFC 4122. It is formatted as 32 hexadecimal digits grouped as 8-4-4-4-12 characters, for example: 550e8400-e29b-41d4-a716-446655440000. Version 4 UUIDs are randomly generated.

How unique is a UUID?

UUID v4 has 122 random bits, giving 2^122 ≈ 5.3 × 10^36 possible values. You would need to generate 2.7 × 10^18 UUIDs to have a 50% chance of any collision. For practical purposes, every UUID you generate can be treated as globally unique.

When should I use a UUID instead of an auto-increment ID?

UUIDs are preferable when you need to generate IDs without a central database (e.g., in distributed systems, offline-first apps), when you don't want to expose sequential IDs (which reveal record counts), or when merging data from multiple sources.

What is the difference between UUID v1 and v4?

UUID v1 is generated from the current timestamp and the device's MAC address, making it traceable to a specific machine and time. UUID v4 is entirely random. v4 is preferred for privacy and when you don't need temporal ordering.

Related tools

Password generator → Base64 → URL encoder →