UUID v4 Generator

Generate cryptographically random UUIDs (v4). Bulk generate up to 100.

Last updated: April 2026
Click Generate

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit identifier formatted as 32 hexadecimal digits in five groups separated by hyphens (e.g., 550e8400-e29b-41d4-a716-446655440000). UUIDs are designed to be unique across all systems without requiring a central authority.

UUID Version 4

Version 4 UUIDs are generated using random or pseudo-random numbers. This tool uses the Web Crypto API (crypto.getRandomValues) for cryptographically secure randomness. The probability of generating two identical v4 UUIDs is approximately 1 in 5.3 × 10^36 — effectively impossible.

When to Use UUIDs

UUIDs are used as database primary keys (especially in distributed systems), API request identifiers, session tokens, file naming for collision avoidance, and message queue identifiers. They are preferred over auto-incrementing integers when records are created across multiple servers or need to be merged.

Frequently Asked Questions

What is a UUID and why should I use one?

A UUID (Universally Unique Identifier) is a 128-bit identifier that is practically guaranteed to be unique across all systems worldwide without requiring a central authority. UUIDs are ideal for database primary keys in distributed systems, API request tracking, session management, and any scenario where records are created across multiple servers.

How unique is a UUID v4?

UUID v4 generates identifiers using 122 bits of randomness (6 bits are used for version and variant flags). The probability of generating two identical UUIDs is approximately 1 in 5.3 × 10^36. You would need to generate 1 billion UUIDs per second for 85 years to have a 50% chance of a single collision.

What is the difference between UUID versions?

Version 1 uses timestamp and MAC address (can leak identity). Version 3 and 5 use namespace hashing (MD5 and SHA-1 respectively). Version 4 uses cryptographic randomness and is the most widely used. This tool generates v4 UUIDs using the Web Crypto API for maximum randomness.

When should I use UUID vs auto-increment ID?

Use UUIDs when records are created across multiple servers or databases that need to be merged, when IDs are exposed in URLs and you want to prevent enumeration attacks, or when you need to generate IDs before inserting into the database. Use auto-increment when you need compact sequential identifiers and operate a single database.