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.

โœ“ UUID v7 โ€” DB-friendlyโœ“ Decode timestampsโœ“ Bulk up to 100โœ“ No signup

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?

FormatLengthSortableBest for
UUID v436 charsโœ— RandomGeneral use, distributed systems
UUID v736 charsโœ“ By timeDatabase PKs, event IDs, logs
ULID26 charsโœ“ By timeDBs, sorting as plain strings
NanoID21 charsโœ— RandomURLs, 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.