This generator creates version 4 UUIDs using the browser's cryptographically secure random number generator, not a generic pseudo-random function. It's used for database primary keys, session identifiers, unique file names, or anywhere you need a distinct value every time without coordinating with anyone else.
UUIDs are generated right in your browser; there's no server request involved, so you can generate as many as you need with no limit or wait.
How to use
- 1Choose how many UUIDs you need, up to 100 at once.
- 2Turn on uppercase or no-hyphens if your system requires it.
- 3Press “Regenerate” to get a fresh batch with the same format.
- 4Copy a single value, copy them all, or download the list as a text file.
What you can do
- UUID v4 from a cryptographic generator
- Up to 100 at once
- Bulk copy
What a UUID v4 is and when to use it
A UUID (universally unique identifier) is a 128-bit value written as 32 hexadecimal characters grouped into five dash-separated blocks, for example 3fa85f64-5717-4562-b3fc-2c963f66afa6. Version 4 is generated fully at random (with a couple of fixed bits marking its version and variant), unlike other versions that derive from the current time or a machine's network address.
- Primary keys in distributed databases, without relying on a central counter.
- Session, request or resource identifiers in an API.
- Unique file names when handling user uploads.
- Test fixtures that must never collide between runs.
Is UUID v4 unique?
In theory it could repeat; in practice it won't. A UUID v4 has 122 truly random bits, giving 2 to the power of 122 possible combinations — generating even a 50% chance of a single collision would take quadrillions of UUIDs per second for years. That's why it's treated as unique without ever checking it against an existing list.
Formatting: case and hyphens
The standard (RFC 4122) defines a UUID in lowercase with hyphens, which is what this tool and most programming languages return by default. Some legacy systems expect uppercase, or the value without hyphens (32 characters in a row); this tool lets you toggle either option without changing the generated value, only how it's written.
Frequently asked questions
What is a UUID v4?
It's a randomly generated 128-bit identifier, written as 32 hexadecimal characters in five dash-separated groups. The “v4” means it's generated at random, unlike other versions based on time or network address.
Is UUID v4 unique?
It's mathematically possible for two to collide, but the odds are so low (2 to the power of 122 combinations) that it's treated as unique in practice. There's no need to check for duplicates when using it as a key.
What's the difference between UUID v1 and UUID v4?
UUID v1 is derived from the exact time and, in some implementations, the machine's network address, which can leak information about when and where it was created. UUID v4 is fully random and reveals nothing about its origin, which is why it's the recommended default.
Do I need hyphens in a UUID?
It depends on the system consuming it. The standard format includes hyphens, but some older databases or APIs expect the value without them. This tool can generate either format.
Where does this generator's randomness come from?
It uses the browser's cryptographic API (crypto.getRandomValues, or crypto.randomUUID when available) — the same one used to generate encryption keys. It's not a generic pseudo-random function like Math.random.
Can I use a UUID as a database primary key?
Yes, that's a very common use case, especially in distributed systems where several services need to create identifiers without coordinating with each other. Keep in mind it takes more space than an auto-incrementing integer and doesn't preserve a sequential order.