AfroTools / Developer Tools / UUID Generator

Generate IDs with the tradeoffs visible.

Create UUID v4, UUID v7, ULID and NanoID-style identifiers locally. Inspect timestamps, random bits, collision risk, sort behavior and database usage before choosing an ID format.

UUID v7 sortable IDs Local crypto randomness Collision math Database snippets

Generate IDs

Everything runs in this browser using Web Crypto where randomness is needed.

Generated IDs

Fresh IDs appear here.

Validate and Inspect

Paste any UUID, ULID or generated ID to inspect format and anatomy.

Collision Calculator

Birthday-bound estimate for random identifier spaces.

Implementation Snippets

Practical storage patterns for generated IDs.
Should I use UUID v4 or UUID v7 for database primary keys?

UUID v4 is excellent for opaque random IDs. UUID v7 includes a Unix-millisecond timestamp prefix, so new IDs sort roughly by creation time and are usually friendlier to database indexes.

Does UUID v7 leak information?

Yes, it leaks approximate creation time. That is usually fine for internal database keys, but may be undesirable for public identifiers where timing reveals business activity.

Are NanoID-style IDs official UUIDs?

No. NanoID-style IDs are compact random strings. They are useful for public slugs and short references, but they do not carry UUID version or variant structure.