UUID Generator
Generate version 4 UUIDs — 128-bit identifiers built from random data and written as the familiar 36-character hyphenated string. They exist so separate systems can each create identifiers without coordinating with one another, and still safely assume no two will ever collide.
How to generate a UUID
- A fresh UUID is generated the moment the page opens.
- Tap Copy to use it, or Generate for another one.
When you'd use this
- Database keys — Primary keys that can be generated anywhere without a central counter.
- Distributed systems — Several services creating records independently without ever clashing.
- Test data — Realistic-looking identifiers for development and testing.
- Request and file names — Unique names for uploads, background jobs or trace identifiers.
Good to know
- Version 4 means random — All but six of the bits are random. The rest mark the version and variant, which is why the thirteenth character is always a 4.
- Cryptographic randomness — Values come from the browser's cryptographic generator rather than an ordinary random function, which is what makes the collision arithmetic meaningful.
- Collisions are possible in theory only — There are 2^122 version 4 UUIDs — about 5.3 × 10^36. Generating a billion every second, you would still wait far longer than the age of the universe for a realistic chance of a repeat.
- Unique is not secret — A UUID is designed to be unique, not unguessable. They appear in URLs and logs routinely, so never use one as a password or an access token.
Frequently asked questions
What is a version-4 UUID?
A 128-bit identifier made almost entirely of random bits, formatted as five hex groups like 123e4567-e89b-42d3-a456-426614174000. The "4" at the start of the third group marks the version.
Can two UUIDs collide?
In theory yes, in practice no — with 122 random bits, you could generate a billion UUIDs per second for decades before a duplicate becomes likely. That's why they're used as database keys without coordination.
How random is it?
It uses the browser's crypto API (crypto.randomUUID or crypto.getRandomValues) — cryptographically secure randomness, not Math.random().
Can two UUIDs ever be identical?
In principle yes, in practice no. Version 4 draws 122 random bits, giving roughly 5.3 × 10^36 possibilities. Even at a billion per second, a collision remains vanishingly unlikely over any timescale that matters.
What is the difference between UUID versions?
Version 4 is random, which is what this tool produces and what most applications want. Version 1 is built from a timestamp and a machine identifier, which makes it sortable but leaks where and when it was created.
Are these safe to use as secret tokens?
No. They come from cryptographic randomness, but a UUID is meant to be unique rather than confidential and is routinely exposed in URLs and logs. Use a purpose-built token for anything that grants access.