UUID Generator — Online & Free
Free Online UUID Generator
Generate v4 UUIDs in bulk. Copy single or all. Runs entirely in your browser — instant.
Open UUID Generator →What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier designed to be globally unique without requiring a central authority to assign them. The format is 32 hexadecimal digits displayed in 5 groups separated by hyphens: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
550e8400-e29b-41d4-a716-446655440000
UUIDs are used as primary keys in databases, identifiers in APIs, file names, session IDs, and anywhere you need a unique identifier that can be generated without coordination between systems.
UUID versions explained
| Version | How generated | Use case |
|---|---|---|
| v1 | Timestamp + MAC address | Sortable but leaks machine info — avoid |
| v3 | MD5 hash of namespace + name | Deterministic IDs from a name |
| v4 | Random (122 bits of randomness) | Most common — use this for general purposes |
| v5 | SHA-1 hash of namespace + name | Deterministic IDs (better than v3) |
| v7 | Timestamp + random (RFC 9562) | Sortable + random — best for databases |
For most use cases — database primary keys, API identifiers, session tokens — UUID v4 is the right choice. It's random, collision-resistant, and universally supported.
How to generate UUIDs online
- Open the UUID generator on tinybench.dev
- Set how many UUIDs you want (1 to 100)
- Click Generate
- Copy a single UUID or copy all at once
Every UUID is generated using crypto.randomUUID() or a cryptographically secure random number generator in your browser — not on a server.
Generate UUIDs in code
// Built-in — no library needed (modern browsers + Node 15+) const uuid = crypto.randomUUID(); // "550e8400-e29b-41d4-a716-446655440000"
import uuid # Generate a single UUID v4 uid = str(uuid.uuid4()) print(uid) # "550e8400-e29b-41d4-a716-446655440000" # Generate 10 UUIDs uuids = [str(uuid.uuid4()) for _ in range(10)]
-- Generate a UUID SELECT gen_random_uuid(); -- Use UUID as primary key CREATE TABLE users ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), name TEXT NOT NULL );
-- Generate a UUID SELECT UUID(); -- As default primary key value CREATE TABLE users ( id CHAR(36) PRIMARY KEY DEFAULT (UUID()), name VARCHAR(255) NOT NULL );
UUID as a database primary key
UUIDs are popular as primary keys because they can be generated anywhere — on the client, in a microservice, or in the database — without needing to query a sequence or auto-increment counter. This is valuable in distributed systems.
Trade-offs to be aware of:
- Size — 16 bytes (binary) or 36 bytes (string) vs 4–8 bytes for an integer
- Index performance — random UUIDs fragment B-tree indexes. Consider UUID v7 or ULID for high-write workloads.
- Readability — UUIDs are less readable than sequential integers in logs and URLs
- No ordering — unlike integers, UUID v4 doesn't reveal insertion order
Frequently asked questions
Try it now — free & private
Runs entirely in your browser. No sign-up, no uploads, no tracking.
Open UUID Generator →