UUID Generator
Click Generate to produce a fresh UUID v4 instantly, or set a quantity (up to 50) to generate a batch. Each UUID is cryptographically random, produced using your browser's crypto.randomUUID() or crypto.getRandomValues() API. Copy all results with one click — nothing is sent to a server.
Related Tools
[5 suggestions]UUID v7 Generator
Generate time-ordered UUID v7 identifiers, and decode the creation time inside any UUID.
Developer & WebBase64 Encoder / Decoder
Easily encode plain text to Base64 format or decode Base64 back to readable text.
Developer & WebURL Encoder / Decoder
Encode URI components or decode percent-encoded URLs safely and reliably.
Developer & WebPassword Generator
Generate cryptographically secure random passwords with custom length and character sets.
Developer & WebRandom Number Generator
Pick random numbers between any minimum and maximum, with decimals, no repeats and sorting. Every value is equally likely.
Writing & ContentGuides for the UUID Generator
- How to Generate Random Numbers Without Bias
Learn to generate random numbers fairly: why Math.random falls short, what modulo bias is and how rejection sampling fixes it. Tested on 70 million numbers. (November 16, 2026)
- How to Generate a UUID v7: Code, Database and Online Options
How to generate a UUID v7 in JavaScript, Python, .NET and PostgreSQL, why same-millisecond IDs need a counter, and a free generator that keeps them in order. (October 22, 2026)
- How Long Should a Password Be? What NIST Says and How to Choose
How long should a password be? NIST says 15 characters at least when it is the only factor. See the math, passphrase options and a tested generator. (October 16, 2026)
- UUID v4 vs v7: Differences, Format and Which One to Use
UUID v4 vs v7 explained: how each is built, how to read the timestamp in a v7, collision odds and which to pick for database keys and public IDs. (October 14, 2026)
About the UUID Generator
A UUID (Universally Unique Identifier) is a 128-bit value formatted as five hyphen-separated groups of hexadecimal digits: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx. The "4" in the third group marks it as version 4 (random), and the "y" encodes the RFC 4122 variant bits (8, 9, a, or b). Version 4 UUIDs are the most widely used type because they require no coordination between generators — the probability of a collision in a set of 1 trillion UUIDs is approximately 0.000000001%, making them effectively unique in practice. Developers use UUIDs as primary keys in distributed databases (PostgreSQL, MongoDB), as idempotency keys in payment APIs, as correlation IDs for distributed tracing (OpenTelemetry), and as file or asset identifiers in storage systems like AWS S3. This tool uses the browser's native crypto.randomUUID() where available, falling back to crypto.getRandomValues() for older environments — both produce cryptographically strong randomness, unlike Math.random().
What is a UUID v4?▾
UUID v4 is a 128-bit identifier generated from cryptographically random bytes. It follows the format xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, where "4" denotes version 4 and "y" encodes variant bits. Collisions are astronomically unlikely.
Is it safe to use as a database primary key?▾
Yes — UUID v4 is widely used as a primary key in relational and NoSQL databases. For write-heavy tables in PostgreSQL, consider UUID v7 (time-ordered) to avoid index fragmentation, but v4 is fine for most use cases.
Why not use Math.random() to generate UUIDs?▾
Math.random() is not cryptographically secure and can produce predictable values. This tool uses the browser's crypto.randomUUID() or crypto.getRandomValues() API, which is cryptographically strong and suitable for security-sensitive identifiers.