Skip to main content
← Home

UUID v4 Generator

Generate random version 4 UUIDs

What is a UUID v4?

122 of the 128 bits are random; the remaining 6 bits mark version 4 and the variant. A v4 UUID carries no timestamp or machine information. Because the values are spread randomly, they can fragment B-tree indexes when used as primary keys in very large tables — UUID v7 avoids that.

Examples

UUID v4 — the 13th digit is always 4, the 17th is 8, 9, a or b
f47ac10b-58cc-4372-a567-0e02b2c3d479
The same format in JavaScript
crypto.randomUUID()

Frequently asked questions

How random is a UUID v4?

This tool uses the browser's cryptographically secure random number generator, so each UUID has 122 bits of unpredictable randomness.

How likely is a UUID v4 collision?

Extremely unlikely: you would need to generate about 2.7 quintillion UUIDs to have a 50% chance of a single duplicate.

Can I use a UUID v4 as a secret token?

It is unpredictable, but it was designed as an identifier, not a secret. For API keys or session tokens use a dedicated token with at least 128 bits of randomness, such as one from our password generator.

Related tools