DevKitHub

API & Security

UUID Generator (v4)

Generate up to 1,000 version 4 UUIDs at once. Values come from your browser’s cryptographic random number generator, not from a server.

0 lines

This tool runs entirely in your browser. Your input is never uploaded, stored or logged.

How it works

A version 4 UUID is 128 bits, of which 122 are random. Six bits are fixed: four identify the version and two identify the variant, which is why the thirteenth hex digit is always 4 and the seventeenth is always 8, 9, a or b.

The random bits come from your browser’s cryptographic generator — crypto.randomUUID where available, and crypto.getRandomValues otherwise. Neither is Math.random, which is seeded predictably and must never be used for identifiers that end up in a database or a URL.

With 122 random bits, collisions are not a practical concern: you would need to generate billions of UUIDs before the probability became worth thinking about. The real trade-off is not uniqueness but ordering — random values arrive in no particular sequence, which scatters writes across a B-tree index. Where insert order matters, UUIDv7 or a ULID keeps the uniqueness and adds a time prefix.

Common problems

Every example below is run against this tool in our test suite, so what it says here is what the tool actually does.

Count must be a whole number of at least 1

Why:
A fractional or zero count. The generator produces discrete values.
Fix:
Enter a whole number between 1 and 1000.

Frequently asked questions

Are these UUIDs safe to use as database keys?
Yes. Version 4 UUIDs are 122 bits of randomness from a cryptographically secure source, so collisions are not a practical concern. Note that random UUIDs can fragment B-tree indexes; UUIDv7 or ULIDs are better where insert ordering matters.
Are the UUIDs generated on your server?
No. They are generated in your browser using the Web Crypto API. Nothing is transmitted, stored or logged.

Last updated