About UUID Generator
Generate UUID v1 through v7, ULIDs, NanoIDs and Snowflake IDs in bulk, with each format's structure explained.
What it does
Produce single identifiers or thousands at once, across the formats people actually use. Generated values can also be inspected — paste a UUID and see its version, variant and, where the format carries one, its embedded timestamp.
Which format to reach for
v4 is random and the safe default when you just need uniqueness. v7 is the modern choice for database primary keys: it begins with a timestamp, so identifiers sort chronologically and index inserts stay clustered instead of scattering across the B-tree the way v4 does. ULID solves the same problem with a shorter, case-insensitive, URL-friendly encoding. NanoID is for short public identifiers where a 36-character UUID would be ugly in a URL. v1 also embeds a timestamp but historically leaked the generating machine's MAC address.
Common questions
- Which UUID version should I use for a database key?
- v7. Time-ordered identifiers keep index inserts local rather than random, which measurably helps write performance and index size on large tables.
- Can two v4 UUIDs collide?
- In theory. In practice 122 random bits make it negligible — you would need to generate billions per second for a lifetime before a collision became likely.
- Are these random values cryptographically secure?
- Yes. They come from the Web Crypto API's secure random source, not Math.random().
- What is a Snowflake ID?
- A 64-bit format popularised by Twitter that packs a timestamp, a machine id and a sequence number. Compact and sortable, but it needs coordinated machine ids to stay unique.