This UUID/ULID generator produces UUID v4, UUID v7, or ULID identifiers
using cryptographically secure randomness — crypto.randomUUID() for v4, and a
spec-exact hand-built implementation for v7 and ULID, since browsers don't expose those
natively yet.
How to use it
Pick a type, choose how many you need, and click "Generate". Each ID is independent and
unique; for UUID v7 and ULID, generating several in a row will show their shared timestamp
prefix and sortable ordering.
UUID v7's bit layout
48 bits of Unix timestamp in milliseconds, a 4-bit version field (always 0111),
12 bits of random data, a 2-bit variant field, then 62 more bits of random data — 74 bits of
randomness in total, more than enough to avoid collisions even at extremely high generation
rates within the same millisecond.
ULID's bit layout
48 bits of Unix timestamp in milliseconds followed by 80 bits of randomness, the whole
128-bit value encoded in Crockford's base32 (which excludes the easily-confused letters I,
L, O, and U) — 26 characters total, case-insensitive, and lexicographically sortable because
the alphabet is ordered the same as the values it represents.
Frequently asked questions
What's the difference between UUID v4, UUID v7, and ULID?
UUID v4 is 122 bits of pure randomness — no ordering information at all. UUID v7 and ULID both embed a millisecond timestamp so IDs generated later sort after ones generated earlier, which makes them much friendlier as database primary keys (better index locality than random v4). ULID additionally uses Crockford base32 instead of hex, giving a shorter, case-insensitive, more compact string.
Why would I want a sortable ID instead of UUID v4?
Random UUID v4 values scatter randomly through a B-tree index, which hurts insert performance and locality at scale. A timestamp-prefixed ID like UUID v7 or ULID inserts in roughly ascending order, which is significantly friendlier to most database index structures.
How is UUID v4 generated here?
Via the browser's native crypto.randomUUID() — no custom logic, so it's exactly as correct as your browser's own implementation of RFC 9562.
How are UUID v7 and ULID generated, since browsers don't have a native function for those?
Both are constructed by hand from the current timestamp plus cryptographically secure random bits (via crypto.getRandomValues()), following each format's published specification exactly: RFC 9562 §5.7 for UUID v7, and the ulid/spec bit layout for ULID.
Is anything generated here sent anywhere?
No. Generation happens entirely in your browser — nothing is transmitted, logged, or stored.