UUID Generator
Generate UUID v4 (random) and v7 (time-sortable) identifiers in bulk. 100% private — runs in your browser.
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit label used to uniquely identify information in computer systems. It is formatted as 32 hexadecimal characters split into five groups by hyphens: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
UUIDs are designed to be generated independently by different systems without coordination — the probability of two systems generating the same UUID is astronomically small. This makes them ideal as database primary keys, request IDs, file names, and correlation tokens in distributed systems.
The most common versions are UUID v4 (128 random bits — maximum randomness) and UUID v7 (timestamp + random bits — database-friendly because they sort chronologically, which avoids B-tree index fragmentation).
UUID v4 vs UUID v7
| Feature | UUID v4 | UUID v7 |
|---|---|---|
| Structure | Random (122 random bits) | Timestamp (48-bit ms) + random |
| Sortable by time | No | Yes — database-friendly |
| Collision probability | Extremely low | Even lower (time + random) |
| DB index efficiency | Random — causes page splits | Sequential — better B-tree performance |
| Format | xxxxxxxx-xxxx-4xxx-yxxx | ttttttt-tttt-7xxx-yxxx |
| Best for | General purpose IDs | DB primary keys, events |
UUID in Different Languages
| Language / Platform | Method |
|---|---|
| Node.js 14.17+ | crypto.randomUUID() |
| Python 3.x | import uuid; uuid.uuid4() |
| Go | github.com/google/uuid — uuid.New() |
| Java 8+ | UUID.randomUUID().toString() |
| C# .NET | Guid.NewGuid().ToString() |
| PostgreSQL | gen_random_uuid() |
| MySQL 8+ | UUID() |
| Browser JS | crypto.randomUUID() |