Technical Specifications & Architecture
Choose v4 or v1
Version 4 uses Web Crypto for its 122 random bits. Version 1 combines time, a clock sequence and a random node; the device MAC address is not read. Neither format guarantees that collisions can never occur.
The v1 timestamp is represented as an exact integer in 100-nanosecond units, but the underlying browser clock has millisecond granularity. A counter distinguishes calls within one millisecond, and clock rollback advances the sequence. State lives only during page execution; reloading starts with a new random node. Lexicographic v1 ordering is not always creation order.
Changing count or version generates new IDs. Case, hyphens and text/JSON/CSV settings only reformat existing IDs. Hyphen-free output differs from the standard UUID text representation; check the receiving system.
Do not grant access merely because someone possesses a UUID. Generation stops when Web Crypto is unavailable. See RFC 9562, sections 5.1, 5.4, 6.10 and 8.