UUIDDatabaseSystems

What is a UUID?

March 15, 2026Β·5 min read

A Universally Unique Identifier (UUID) is a 128-bit label used for information in computer systems. The term UUID is generally used as a synonym for Globally Unique Identifier (GUID).

Their primary benefit? Anyone can create a UUID and use it to identify something with near certainty that the identifier does not duplicate one that has already been, or will be, created to identify something else.

1. Typical Structure

A UUID is composed of 32 hexadecimal characters broken into five distinct sections, representing 36 total characters. A standard UUID might look like this:

123e4567-e89b-12d3-a456-426614174000

2. The Variants: Why V4 is King

There are five major versions of UUIDs officially defined by RFC 4122. Each solves a specific problem differently.

  • Version 1 (Time/MAC Address): Uses your network cards MAC Address and generation time. Not reliable for privacy-protecting contexts.
  • Version 3 (MD5 Name-based): Identical UUIDs originate from an identical payload hashed in MD5.
  • Version 4 (Randomized): Currently the absolute standard. It generates 122 completely random bits through secure pseudorandom number generators (PRNG).
  • Version 5 (SHA-1 Name-based): Similar to V3, but uses SHA-1 hashing under the hood.

3. Why use UUID over Auto-Increment Integers?

Traditionally databases assign rows an ID starting at 1, increasing by 1. So why replace simple numbers with long messy strings in a modern database backend?

  • Data Hiding: If I am User ID #4 on your website, I immediately know you merely have three users who signed up before me. UUIDs prevent attackers from randomly guessing valid URLs.
  • Offline Systems Syncs: Creating mobile applications means offline users create data. By generating their own UUIDs, when they connect back online later, their IDs will seamlessly merge with the server without ever colliding with another user creating rows simultaneously.

4. Conclusion

UUID V4 ensures massive decentralized systems work collaboratively without single points of failure generating database locks. Although computationally heavier than a standard int, modern databases like PostgreSQL implement first-class native UUID types that completely wipe away the performance overheads.

Try our free UUID Generator to bulk create thousands of V4 IDs instantly.