UUID Generator

Next

UUIDs give you globally unique identifiers without coordinating with a central authority. This generator produces RFC 4122 compliant v1 (timestamp + MAC), v4 (random) and v7 (timestamp-prefixed, sortable) values. Pick a version, ask for 1 or 1000, and copy the list into seed data, API key generation or your unit tests.

How to generate UUIDs

  1. 1

    Choose a version

    v4 for generic random, v7 when sort order matters, v1 when you need timestamp info.

  2. 2

    Pick quantity

    One UUID or a batch of up to 10,000 in a single run.

  3. 3

    Generate

    Values use the browser's crypto API for cryptographic randomness.

  4. 4

    Copy or download

    Grab as a newline list, JSON array or CSV.

Which UUID version should you use?

Version Structure Best for
v1 Timestamp + clock + MAC address Log IDs where you need chronology
v4 122 bits of random Generic unique IDs, test fixtures
v7 Unix timestamp ms + random (sortable) Primary keys in databases

Why v7 is becoming the default

v4 is random, which makes it terrible as a database primary key: inserts scatter across the B-tree and hurt write throughput. v7 (finalised in RFC 9562 in 2024) prefixes the UUID with a 48-bit millisecond timestamp, so new rows land at the end of the index. You still get uniqueness and no coordination, plus rough sort order by creation time.

Format rules

A UUID is 128 bits rendered as 32 hex digits in the 8-4-4-4-12 pattern:

018f5b9c-7d4a-7a1b-8c0e-2e1b3c4d5e6f
         ^^                ^
         version nibble    variant bits
  • Version nibble is the 13th character (after 018f5b9c-7d4a-). It is 4 for v4, 7 for v7, etc.
  • Variant bits are the first two bits of the 17th character. They are 10 (high nibble 8/9/a/b) for RFC 4122 UUIDs.

Collision odds

For v4, the odds of generating a duplicate are vanishingly small: you would need to generate 2.7 quintillion (2.7 × 10^18) UUIDs before hitting a 50% chance of collision. That is more than most databases will ever see. v7 shares the random tail so collision odds are equivalent within the same millisecond.

Frequently Asked Questions

Historically yes because they embedded the generating host’s MAC address. Modern generators (including this one) substitute a random 48-bit node ID, so v1 no longer reveals the hardware.

When generated with a CSPRNG (which this tool uses via crypto.getRandomValues), v4 is unpredictable enough to use as a session token. But UUIDs are not secrets per se, if you need a secret, name it as one.

Yes, they are URL-safe (hex and hyphens only). For shorter display, consider base-32 or base-62 encoding the raw 128 bits, or use a ULID, which is 26 characters and sortable like v7.

No. Generation happens in your browser and the values never touch a server.

Related Tools

Tool available in other languages