UUID & ID Generator
Generate UUIDs, ULIDs, Nano IDs, and more — entirely in your browser, no data sent anywhere.
What is the UUID & ID Generator?
This free online tool generates universally unique identifiers (UUIDs) and other popular ID formats directly in your browser. Every ID is created using the Web Crypto API (crypto.getRandomValues) for cryptographically secure randomness. No data leaves your device — ever.
Whether you need a single UUID for a database record, a batch of Nano IDs for short URLs, or time-sortable ULIDs for event streams, this tool has you covered with one click.
Understanding UUID Versions
UUID v4 — Random
The most widely used UUID version. All 122 bits of randomness are generated by a cryptographic random number generator, giving a collision probability so small it is effectively zero (1 in 2122). Ideal as primary keys, API tokens, and session identifiers. Defined in RFC 9562 §5.4.
UUID v1 — Timestamp + Node
Embeds the current time (100-nanosecond precision since October 15, 1582) along with a clock sequence and a node identifier. This makes v1 UUIDs sortable by creation time, which can improve database index locality. This generator uses a random node with the multicast bit set to preserve privacy. Defined in RFC 9562 §5.1.
UUID v7 — Time-Ordered (Modern)
The newest recommended UUID version for new designs. The first 48 bits encode the Unix timestamp in milliseconds (big-endian), followed by random data. This makes v7 UUIDs monotonically sortable by time — perfect for distributed systems, database primary keys with B-tree indexes, and event ordering. Defined in RFC 9562 §5.7.
Nil UUID
A special UUID with all 128 bits set to zero (00000000-0000-0000-0000-000000000000). Used as a sentinel or placeholder value in applications that require a non-null UUID field. Defined in RFC 9562.
Modern ID Formats
ULID — Universally Unique Lexicographically Sortable Identifier
A 128-bit identifier encoded as 26 Crockford Base32 characters. The first 10 characters encode the millisecond timestamp, ensuring lexicographic sort order matches chronological order. The remaining 16 characters are random. ULIDs are case-insensitive, URL-safe, and avoid ambiguous characters (I, L, O, U). They are a popular alternative to UUIDs in systems that need both uniqueness and natural time ordering.
Nano ID — YouTube-Style Short IDs
A tiny, URL-friendly, unique string ID generator. The default 21-character ID uses a 64-character alphabet (A-Z, a-z, 0-9, underscore, hyphen) for high density — just 21 characters provide roughly the same collision resistance as a UUID v4. The length is configurable from 2 to 128 characters. Perfect for short URLs, invite codes, and user-facing identifiers where compactness matters.
Short ID — Base62 Alphanumeric
A simple random string using the Base62 alphabet (A-Z, a-z, 0-9) — no special characters. Configurable length from 2 to 128 characters. Great for human-readable codes, file names, reference numbers, and anywhere you need clean alphanumeric strings without dashes or symbols.
CUID2-like — Collision-Resistant Prefixed ID
Inspired by the CUID2 specification, these IDs start with the letter "c" followed by a Base36 timestamp and random characters. The fixed prefix makes them easy to identify in logs and databases. Configurable length from 4 to 128 characters. Suitable for distributed systems where collision resistance and human recognizability are both important.
Which ID Type Should You Use?
| Use Case | Recommended |
|---|---|
| Database primary keys (general) | UUID v4 or UUID v7 |
| Time-sortable records | UUID v7 or ULID |
| Short URLs / invite codes | Nano ID or Short ID |
| YouTube-style video IDs | Nano ID (11 chars) |
| Distributed systems / microservices | UUID v7, ULID, or CUID2 |
| Legacy system compatibility | UUID v1 |
| Placeholder / null value | Nil UUID |
Frequently Asked Questions
Are the generated IDs truly unique?
Yes. UUID v4, for example, has 122 bits of randomness — you would need to generate about 2.7 quintillion IDs to have a 50% chance of a single collision. This generator uses the Web Crypto API for cryptographic-quality randomness.
Is my data sent to a server?
No. All IDs are generated entirely in your browser using JavaScript. No network requests are made. You can verify this by disconnecting from the internet and using the tool — it still works.
What is the difference between UUID and GUID?
They are the same thing. UUID (Universally Unique Identifier) is the standard term defined in RFC 9562. GUID (Globally Unique Identifier) is Microsoft's terminology for the same 128-bit identifier format, typically displayed with curly braces.
Should I use UUID v4 or v7 for database primary keys?
If your database uses B-tree indexes (PostgreSQL, MySQL, etc.), UUID v7 is generally better because its time-ordered nature reduces index fragmentation and improves insert performance. UUID v4 works perfectly well for most workloads, but v7 gives you time-ordering for free.
How long should a Nano ID be?
The default 21 characters provides approximately 126 bits of entropy — comparable to UUID v4. For short URLs or invite codes, 10-12 characters often suffice. For security tokens, use 21+ characters. A 11-character Nano ID matches YouTube's video ID length.
Can I use these IDs in production?
Absolutely. The generation algorithms follow their respective specifications. However, for production systems we recommend using established libraries in your language (e.g., uuid for Node.js, java.util.UUID for Java, uuid.uuid4() for Python) rather than copying generated values.