How does crypto.randomUUID() generate random values?
This tool uses the browser's native crypto.randomUUID() API, which draws from the operating system's cryptographically secure random number generator (CSPRNG). On Linux this is /dev/urandom, on macOS it is SecRandomCopyBytes, and on Windows it is BCryptGenRandom. These sources use hardware entropy (CPU timing jitter, interrupt timing) to ensure true randomness — far superior to Math.random().
What is the Nil UUID and when should I use it?
The Nil UUID (00000000-0000-0000-0000-000000000000) is the all-zeros UUID defined in RFC 4122. It serves as a sentinel value meaning “no identifier” or “uninitialized.” Use it as a default value in data structures, a placeholder in templates, or a representation of “null” in systems that require a valid UUID format. Never use it as an actual identifier for a real entity.
Should I use UUIDs or ULIDs for my project?
ULIDs (Universally Unique Lexicographically Sortable Identifiers) encode a 48-bit timestamp + 80 random bits as a 26-character Crockford Base32 string. They are time-sortable like UUIDv7 but shorter (26 vs. 36 characters). Choose UUIDs when you need broad ecosystem compatibility (every database, language, and ORM supports them). Choose ULIDs when string length matters and you control the full stack.