UUID generator

Bulk UUIDs and GUIDs — random v4 or time-ordered v7, with four output formats.

What a UUID is

A UUID is a 128-bit identifier written as 32 hex characters in five groups: 8-4-4-4-12. No central issuer is involved — any machine can mint one at any moment without coordinating, which is why they show up in distributed systems, database keys and request tracing.

The first character of the third group reveals the version — 4 means v4.

v4 or v7?

  • v4 takes all 122 payload bits from a random source. Maximum uniqueness, zero coordination. The cost is that it has no ordering at all: as a database key it scatters inserts across the B-tree, causing page splits and slower writes.
  • v7 puts a 48-bit Unix millisecond timestamp first and fills the rest with randomness. Because it increases with time, inserts append near the end of the index, close to an auto-increment integer in performance, while keeping the randomness and distributed-friendly properties. For new projects, prefer v7.

Practical notes

  • 16 bytes is twice the size of a bigint key, and the index grows accordingly. Under tens of millions of rows this is rarely noticeable.
  • In MySQL do not store them as varchar(36) — binary(16) uses less than half the space and is faster.
  • A UUID leaks its creation time (v7 obviously so). If time is sensitive, do not expose it in public IDs.

FAQ

Can generated UUIDs collide?

For v4 the odds are negligible — generating a billion per second for a century still leaves the collision chance far below one in a billion. In practice, treat them as unique.

Is v7 a real standard?

Yes. UUID v7 is standardized in RFC 9562 (published 2024, replacing RFC 4122) and libraries across major languages are adopting it.

Can I get a shorter ID, like Nanoid?

Switch the format to "no hyphens" for 32 characters. For shorter short-link style IDs, ask via the contact page.

Other tools