UUID / ID Generator

Generate universally unique identifiers in multiple formats. Batch support, timestamp parsing, and custom options. Everything runs in your browser.

All IDs are generated locally in your browser. Nothing is sent to any server.

Tips

UUID v7 Is Best for Database Primary Keys

UUID v7 embeds a timestamp, making IDs naturally sortable by creation time. This dramatically improves database index performance compared to fully random UUID v4, which causes random page splits in B-tree indexes.

UUID v4 Collision Is Practically Impossible

With 122 random bits, you would need to generate about 2.7 quintillion UUIDs before having a 50% chance of a single collision. At 1 billion per second, that takes over 85 years.

ULID Is Shorter Than UUID but Equally Unique

ULID packs the same 128 bits into just 26 characters using Crockford Base32, compared to 36 characters for UUID. It is time-sortable like UUID v7 and avoids confusing characters like I, L, O.

NanoID Length Determines Collision Risk

The default 21-character NanoID has ~126 bits of entropy — comparable to UUID v4. Shorter IDs reduce entropy exponentially: a 10-character NanoID has only ~60 bits, suitable for non-critical uses only.

Common Use Cases

🗄️

Database Primary Keys

Use UUID v7 or ULID as time-sortable primary keys that work across distributed systems without coordination.

🔗

URL Slugs and Short IDs

Generate compact NanoIDs for short URLs, invite codes, or any context where a shorter identifier is preferred.

📊

Event Tracking and Logging

Create unique event IDs that are naturally ordered by time for log aggregation and analytics pipelines.

🔄

Distributed System Coordination

Generate globally unique IDs without a central authority — each node can independently create collision-free identifiers.

📦

Object Storage Keys

Use ULIDs or UUID v7 as S3 or blob storage keys to maintain chronological ordering in bucket listings.

🧪

Test Data Generation

Quickly generate batches of realistic unique IDs for populating test databases or mock API responses.

Frequently Asked Questions

What is the difference between UUID v4 and UUID v7?
UUID v4 is entirely random (122 random bits), making it unpredictable but unsortable. UUID v7 embeds a millisecond timestamp in the first 48 bits, making IDs naturally sortable by creation time while still being unique. Choose v7 for database keys and v4 when you need pure randomness.
Should I use ULID or UUID v7?
Both are time-sortable 128-bit identifiers. UUID v7 follows the official RFC 9562 standard and is recognized by all UUID libraries. ULID is more compact (26 vs 36 characters) and avoids confusing characters. Use UUID v7 for standards compliance, ULID for compactness.
How long should my NanoID be?
The default 21 characters provides ~126 bits of entropy, comparable to UUID v4. For most applications, 21 is ideal. Use 12-16 for low-volume internal IDs. Never go below 10 for anything user-facing or stored long-term.
Are these IDs generated in my browser only?
Yes. All IDs are generated entirely in your browser using the Web Crypto API (crypto.getRandomValues) and JavaScript. Nothing is transmitted to any server. You can verify by disconnecting from the internet — the tool continues to work.
Can UUID collisions actually happen?
Theoretically yes, but practically no. UUID v4 has 122 random bits, giving 5.3 x 10^36 possible values. You would need to generate about 2.7 x 10^18 UUIDs for a 50% collision chance. No real-world system has ever reported a UUID v4 collision from a proper random source.
Can I extract the timestamp from a UUID v7 or ULID?
Yes. UUID v7 stores a Unix millisecond timestamp in the first 48 bits, and ULID stores it in the first 10 Crockford Base32 characters (also 48 bits). This tool automatically displays the decoded timestamp for these formats.