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.
Identifier design check

Choose IDs for the storage and privacy model

Generate UUID, ULID, and NanoID-style values locally, compare collision risk, inspect anatomy, and export IDs for development workflows.

Local generation

Generated IDs are created in your browser.

What to check

  • Confirm random bits, collision risk, timestamp leakage, sort behavior, index size, and prefix privacy before choosing an ID strategy.
  • Use UUIDv4 for broad compatibility, UUIDv7 or ULID for sortable IDs, and custom NanoID only after reviewing alphabet and length.
  • Download CSV/JSON only for development or migration fixtures that are safe to store.

Limitations

  • Disclaimer: generator utility only, not a substitute for database constraints, threat modeling, or production architecture review.
  • Collision estimates depend on assumptions and do not replace unique indexes or backend validation.
  • Do not embed private user meaning, secrets, or sensitive tenant data in prefixes.
Review generated IDs

Source/reference note: verify against RFC 9562, database documentation, and your API/security model before standardizing ID formats.

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.