← Imperial Products / Tools / UUID Generator

UUID Generator

Generate cryptographically random UUID v4 values instantly. Bulk generate up to 100 at once. Everything runs in your browser using the Web Crypto API — nothing is sent to any server.

(max 100)
Click Generate to create UUIDs

What is a UUID?

A UUID (Universally Unique Identifier), also known as a GUID, is a 128-bit label used to uniquely identify resources without a central authority. UUIDs are written as 32 hexadecimal digits grouped in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

UUID Version 4

UUID v4 values are randomly generated using a cryptographically secure random number generator. The probability of generating the same UUID twice is astronomically low — roughly 1 in 5.3 × 1036. This tool uses the browser's crypto.randomUUID() API (or falls back to crypto.getRandomValues()) to guarantee cryptographic randomness.

Common Uses for UUIDs

UUID Formats

More Free Developer Tools

UUID Versions Explained

The UUID specification (RFC 4122) defines five versions, each generated by a different algorithm. Version 1 combines the current timestamp with the MAC address of the generating machine, making it time-ordered but potentially privacy-sensitive since it embeds hardware identity. Version 3 generates a deterministic UUID from an MD5 hash of a namespace and name — given the same inputs, you'll always get the same UUID. Version 4 is purely random, using 122 bits of cryptographic randomness with no relationship to time or the generating host. Version 5 is like v3 but uses SHA-1 instead of MD5. A newer Version 7 (RFC 9562) combines a Unix timestamp prefix with random bits, giving it the sortability of v1 without the privacy concerns — it's increasingly used as a database primary key because it's both unique and monotonically increasing.

Which Version Should You Use?

For the vast majority of use cases — database primary keys, session IDs, file names, API resource identifiers — UUID v4 is the correct choice. It's supported everywhere, universally understood, and makes no assumptions about your infrastructure. Use UUID v5 when you need deterministic, reproducible identifiers from a known input — for example, generating a stable UUID for a URL or an email address so you can reference the same resource consistently across systems. Use UUID v7 if you're working on a high-performance database where index locality matters and you need time-ordered keys without a sequential integer.

Collision Probability

UUID v4 uses 122 bits of randomness (the other 6 bits encode the version and variant). The probability of generating a duplicate when creating 1 billion UUIDs per second for 100 years is approximately 50% — meaning at that generation rate you'd expect your first collision sometime around the year 2124. For any practical application generating fewer than a trillion UUIDs over its lifetime, the collision probability is so small it can be treated as zero. This is why UUIDs don't require a central authority to guarantee uniqueness, unlike auto-incrementing database IDs.

Database Considerations

When using UUID v4 as a primary key in a relational database, be aware that random UUIDs cause index fragmentation in B-tree indexes because new records insert at random positions rather than at the end. For high-write-rate tables in MySQL or PostgreSQL, this can impact performance. The solutions are to use UUID v7 (time-ordered), use the gen_random_uuid() function with PostgreSQL's native UUID type, or store UUIDs as binary(16) rather than varchar(36) to save storage space.