Utilify

UUID Generator

Generate cryptographically random UUID v4 identifiers — single or bulk, instantly.

Built and maintained by Jay SooUpdated August 17, 2026

How to use UUID Generator

  1. 1
    Choose count

    Generate 1 or up to 100 UUIDs at once.

  2. 2
    Click Generate

    Fresh UUIDs appear in the output.

  3. 3
    Copy

    Copy one UUID or the entire list.

About UUID Generator

UUIDs (Universally Unique Identifiers) are 128-bit values designed to be unique across space and time without any central coordination. The most common form, UUID v4, is essentially 122 bits of randomness — the probability of a collision is so vanishingly small (approximately 1 in 2^61 even after generating a billion per second for 85 years) that it is safe to treat them as guaranteed unique.

UUIDs are standard for database primary keys when you cannot rely on auto-incrementing IDs (distributed systems, offline-first applications, anti-enumeration concerns), for unique filenames, session identifiers, and any case where you need a unique identifier without coordinating with a central allocator. Utilify uses crypto.randomUUID() — your browser's built-in, cryptographically secure random number generator — so the values are suitable for security-sensitive contexts.

A UUID is conventionally written as 32 hexadecimal digits in five groups separated by hyphens: 8-4-4-4-12, like "550e8400-e29b-41d4-a716-446655440000". In a v4 UUID the version digit (the first character of the third group) is always "4", and the variant digit (the first character of the fourth group) is one of 8, 9, a, or b. Those fixed bits are why a v4 UUID has 122 random bits rather than the full 128.

There is an important trade-off when using random UUIDs as database primary keys. Because v4 values are random, inserting them into a B-tree index scatters writes across the whole index rather than appending to the end, which can hurt write performance and cache locality at scale. Newer schemes such as UUID v7 embed a timestamp prefix to keep IDs roughly time-ordered while staying globally unique — worth considering if you are generating millions of rows. For the vast majority of uses, v4 is the simple, correct default.

UUID v4 is also distinct from a GUID only in name — GUID is Microsoft's term for the same 128-bit identifier, so the two are interchangeable in practice.

UUID v1 vs v4 vs v7 — which version do you actually want?

All three are 128-bit UUIDs, but they encode very different things — and that changes where each one belongs:

v1 (timestamp + node)v4 (random — this tool)v7 (time-ordered)
What it encodes60-bit Gregorian timestamp + clock sequence + 48-bit node (often the MAC address)122 random bits48-bit Unix millisecond timestamp + 74 random bits
Sortable by creation time?Roughly, but the byte layout scrambles the orderNoYes — lexicographic order tracks creation order
What it leaksCreation time and potentially the MAC address of the machineNothingCreation time only
B-tree index behaviorScrambled field order hurts localityRandom inserts scatter across the whole index at scaleAppend-friendly, cache-local
Pick it whenA legacy system already uses it — avoid for new designsThe general default: session IDs, idempotency keys, filenamesPrimary keys in high-volume, insert-heavy tables

Need sortable or shorter IDs with different trade-offs? The UUID v7, ULID, and nanoid generators are linked under Related tools below.

When to use UUID Generator

  • Database primary keys

    Use as a stable ID for entities created on the client or offline before sync.

  • Idempotency tokens

    Pass to APIs as the idempotency key so retries do not double-charge or double-create.

  • Unique filenames

    Avoid collisions when storing user uploads in object storage like S3 or R2.

Four ways UUIDs go wrong in production

  • Truncating a UUID to make it shorter

    Keeping only the first 8 hex characters leaves 32 bits of entropy — by the birthday bound you hit a 50% collision chance after only about 77,000 IDs. If you need short identifiers, use a purpose-built short-ID scheme (like nanoid) with a deliberate length, not a chopped UUID.

    550e8400-e29b-41d4-a716-446655440000 → "550e8400"
    32 bits left → ~50% collision odds at ≈77k IDs
  • Generating UUIDs with Math.random()

    Math.random() is designed for statistical distribution, not unpredictability — it is not cryptographically secure, and its internal state gives far weaker uniqueness guarantees than a CSPRNG. Use crypto.randomUUID() — it is what this tool uses, and it is available in every modern browser and Node 14.17+.

  • Using v4 keys in huge insert-heavy tables

    Because v4 values are random, every insert lands on a random page of the primary-key index — at millions of rows this thrashes caches and slows writes. Time-ordered UUID v7 keeps inserts append-like while staying globally unique.

  • Comparing UUIDs case-sensitively

    UUIDs are hexadecimal and case-insensitive; RFC 9562 canonicalizes them as lowercase, but some platforms and tools emit uppercase. A byte-for-byte string comparison then treats the same ID as two different values. Normalize to lowercase at system boundaries.

Frequently asked questions

Are these UUIDs truly random?+

Yes — they are generated with crypto.randomUUID(), which uses your browser's cryptographically secure RNG, making them suitable even for security-sensitive contexts.

What version of UUID is this?+

UUID v4 (random): 128 bits total, 122 of which are random. The version and variant bits are fixed by the specification.

Is a UUID the same as a GUID?+

Yes. GUID is Microsoft's name for the same 128-bit identifier format. The terms are interchangeable.

Can two generated UUIDs ever collide?+

In practice, no. With 122 random bits the collision probability is astronomically small — you could generate a billion per second for 85 years and still be unlikely to see one.

Should I use v4 UUIDs as database keys?+

For most apps, yes. At very large scale their randomness can scatter index writes and slow inserts; UUID v7, which is time-ordered, is worth considering if you generate millions of rows.

Related tools

From the blog