Generate a UUID instantly, right in your browser
Click Generate and you get a fresh, unique identifier ready to paste into your database, API, config file, or code. No sign-up, no rate limits, nothing uploaded anywhere.
Every UUID is created using your browser's own cryptographically secure random source (crypto.getRandomValues), so the values are private and never leave your device.
How to use the UUID generator
- Choose a version from the dropdown (v4 is the right choice for most use cases).
- Set how many UUIDs you need — anywhere from 1 to 100 at once.
- Click Generate.
- Hit Copy to grab the result, or select all and paste the bulk list wherever you need it.
Worked example
Say you need a unique ID for a new user record. Click Generate with v4 selected. You get something like:
3b1a7f24-e109-4c82-bd5e-09f3a6c8d712
Paste that directly into your users table as the primary key. Done. It's 36 characters in the standard 8-4-4-4-12 hex format, separated by hyphens — the same format used by every UUID library and database driver in the wild.
UUID versions at a glance
| Version | Based on | Best for |
|---|---|---|
| v1 | Timestamp + MAC address (node) | When you need to know roughly when an ID was created; leaks machine info so avoid in public APIs |
| v4 | Cryptographically random | The safe default — unique identifiers for users, orders, sessions, documents |
| v5 | SHA-1 hash of a name + namespace | Deterministic IDs: same input always produces the same UUID — useful for deduplication or content addressing |
| v7 | Unix timestamp + random bits | Time-ordered and random — ideal as a sortable database primary key (better index performance than v4) |
GUID (Globally Unique Identifier) is simply Microsoft's name for the same thing. A UUID and a GUID are identical in format and meaning — you'll see both terms used interchangeably in Windows and .NET codebases.
How to generate a UUID in code
If you need UUIDs inside your own application rather than a one-off value, here's the shortest path in the two most common languages.
JavaScript / Node.js
The built-in crypto module (Node 14.17+) or the RFC 9562-compliant uuid npm package both work well:
// Node.js 19+ built-in (no install needed)
import { randomUUID } from 'crypto';
console.log(randomUUID());
// e.g. '3b1a7f24-e109-4c82-bd5e-09f3a6c8d712'
// OR with the uuid package
import { v4 as uuidv4 } from 'uuid';
console.log(uuidv4());
Python
Python's standard library has you covered — no third-party package needed:
import uuid
# v4 (random)
print(uuid.uuid4())
# e.g. UUID('3b1a7f24-e109-4c82-bd5e-09f3a6c8d712')
# v5 (name-based, deterministic)
print(uuid.uuid5(uuid.NAMESPACE_URL, 'https://example.com'))
How it works
A UUID is a 128-bit number, printed as 32 lowercase hex digits split into five groups by hyphens (8-4-4-4-12). Two bits encode the variant; four bits encode the version. For v4, the remaining 122 bits are filled with random data from crypto.getRandomValues() — the same source browsers use for TLS and password managers.
The probability of two v4 UUIDs colliding is roughly 1 in 5.3 × 1036. In practice, you would need to generate billions of UUIDs per second for thousands of years before a collision became likely. They are safe to use as unique IDs without any central coordination.
The format is defined by the IETF in RFC 9562 (which updated the original RFC 4122).
When to use a UUID — and when not to
Good fits
- Primary keys in relational or NoSQL databases where you need IDs to be globally unique across services or environments.
- Session tokens, API keys (generated server-side, not exposed raw as secrets).
- Correlating events across distributed systems — logs, tracing, message queues.
- Anywhere you want IDs that don't leak sequence or count (unlike auto-increment integers).
Consider alternatives when…
- You need short, human-readable IDs — look at NanoID or short codes instead.
- Your database is extremely write-heavy and you're using older MySQL with InnoDB — random v4 UUIDs can fragment indexes; v7 or ULID are drop-in fixes that keep sort order.
- You need a secret, not just a unique value — use a cryptographic token (e.g.
crypto.randomBytes) instead; a UUID is not secret by design.
Bottom line: v4 works for almost everything. Use v7 when index performance on time-based inserts matters, and v5 when you need the same ID to come out for the same input every time. Generate one above and you're good to go.