Generate cryptographically secure UUID v4 — single or in bulk. 100% local
A UUID (Universally Unique Identifier) is a 128-bit identifier in the format xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx. Version 4 is generated with cryptographically secure random numbers — the collision probability between two UUID v4 is astronomically low.
UUIDs are used as primary keys in databases, document IDs in Firestore (although Firebase prefers push() or doc() auto-IDs), session tokens, and anywhere you need a unique ID without central coordination.
UUID or Firebase auto-ID — which to use with Firestore?
Firebase automatically generates secure random IDs with db.collection('items').doc() — they're optimized to avoid query hotspots. UUIDs are preferable when you need to generate the ID client-side before writing the document, or when integrating with external systems.
How do I generate a UUID in JavaScript without libraries?
With the Web Crypto API: crypto.randomUUID() — available in modern browsers and Node.js 14.17+. Alternatively: ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,c=>(c^crypto.getRandomValues(new Uint8Array(1))[0]&15>>c/4).toString(16)).
This tool generates unique UUID v4 and ULID identifiers, one or several at a time, in standard, uppercase, or no-dashes format, processing everything locally in your browser.
UUID v4 is generated completely at random and isn't chronologically sortable. ULID, on the other hand, embeds a timestamp in its structure, so IDs generated in sequence come out naturally sortable, in addition to being unique.
No, generation happens entirely in your browser via the native crypto API: no generated UUID or ULID is ever sent or logged anywhere.
Yes, you can generate several UUIDs or ULIDs in one go, useful for quickly populating test data.