// v4 vs v7 vs ULID: which one?
- UUID v4: 122 bits of pure randomness. Collisions are astronomically unlikely. Downside: the values are unordered, which can fragment a database B-tree index when used as a primary key.
- UUID v7: a millisecond timestamp in the high bits, random in the rest. Sorts in roughly creation order while staying globally unique. The modern default for database keys.
- ULID: 26-character Crockford base32. Also time-sortable, slightly more compact, and friendlier in URLs (no hyphens, case-insensitive, avoids ambiguous characters).
Randomness: every value uses
crypto.getRandomValues(), the browser's cryptographically secure RNG,
not Math.random(). Generation happens entirely on your device.
Related: need a secret instead of an identifier? The Strong Password Generator uses the same secure RNG.
// a free, browser-only tool by Tiempo Software, built in Omaha, Nebraska. Runs entirely in your browser; nothing you enter is uploaded. see all tools.