Developer Tool
UUID Generator
Generate UUID v4, v7, ULID, and NanoID โ with format options, bulk export, and timestamp decode. All in your browser, nothing sent anywhere.
Timestamp-sortable ยท ideal for database PKs ยท Press R to regenerate
๐ Generated in your browser via crypto.getRandomValues() โ nothing sent anywhere.
Which format should you use?
| Format | Length | Sortable | Best for |
|---|---|---|---|
| UUID v4 | 36 chars | โ Random | General use, distributed systems |
| UUID v7 | 36 chars | โ By time | Database PKs, event IDs, logs |
| ULID | 26 chars | โ By time | DBs, sorting as plain strings |
| NanoID | 21 chars | โ Random | URLs, session IDs, short links |
Frequently asked questions
What is the difference between UUID v4 and UUID v7?
UUID v4 is entirely random โ 122 random bits, universally unique, but not sortable by creation time. UUID v7 (RFC 9562) embeds a 48-bit millisecond timestamp in the first six bytes, making rows naturally sortable by insertion time and dramatically improving B-tree index performance. v7 is the recommended choice for database primary keys in 2024+.
Why should I use UUID v7 as a database primary key instead of v4?
Random v4 UUIDs cause fragmentation in B-tree indexes โ every insert goes to a random page, forcing expensive page splits and making the index balloon in size. v7 UUIDs sort monotonically (new IDs always append to the right of the B-tree), which is equivalent to using an auto-increment integer while still being globally unique and safe to generate client-side without a sequence.
What is a ULID?
ULID (Universally Unique Lexicographically Sortable Identifier) encodes a 48-bit timestamp and 80 random bits as 26 Crockford Base32 characters. Like UUID v7 it's timestamp-sortable, but it's shorter, has no dashes, and uses a case-insensitive alphabet that avoids ambiguous characters (0, O, I, L). ULIDs sort correctly as plain strings in any database column.
What is NanoID and when should I use it?
NanoID generates 21 URL-safe characters (A-Z, a-z, 0-9, _, -) with 126 bits of entropy. It's smaller than a UUID when stored as a string, URL-friendly without encoding, and a good choice for short link IDs, session tokens, or any identifier that appears in a URL.
Can I decode a UUID to find out when it was created?
Yes โ for UUID v7 and ULID, the timestamp is embedded directly in the identifier. Paste one into the Validate tab and the tool will extract the exact millisecond it was created. For UUID v4, no timestamp exists โ all bits are random.
What do the format options mean?
Standard is lowercase with dashes (the default). UPPERCASE is the same with capital letters. No dashes removes the hyphens (useful for some databases). Braces wraps in {} (Microsoft-style). URN prefixes with urn:uuid: (for URN namespaces). SQL wraps in single quotes for direct use in INSERT statements.
Is this generator cryptographically secure?
Yes. All randomness comes from crypto.getRandomValues() โ the same Web Cryptography API used by password managers and TLS. This is a CSPRNG (cryptographically secure pseudo-random number generator) and is suitable for security-sensitive identifiers.
More Productivity Tools
Explore our other privacy-focused tools designed to boost your productivity
WCAG Color Contrast Checker
Check WCAG 2.1 AA/AAA contrast ratios for any two colors โ suggest fix, copy as CSS, shareable URL, no uploads
Password Generator
Strong random passwords or passphrases โ set length, character sets, bulk generate 50 at once ยท crypto.getRandomValues() ยท works offline
UUID Generator
UUID v4, v7, ULID & NanoID โ v7 is timestamp-sortable and B-tree friendly for DB PKs ยท bulk up to 100 ยท decode embedded timestamp ยท no uploads