All articles

What Is a UUID?

The unique identifier behind databases, APIs and session keys — explained simply.

September 10, 2026 Tool Vault Team

A UUID (Universally Unique Identifier) is a 128-bit number used to label information without a central authority handing out IDs. It's why two different systems can each generate IDs independently and still be confident they'll never collide. You've almost certainly seen one — they look like this:

550e8400-e29b-41d4-a716-446655440000

What UUID stands for

The name says it all: a UUID is meant to be unique across all time and space, without any coordination. That's different from a database auto-increment column (like 1, 2, 3), which is unique only within one table and reveals information about how many records exist.

Microsoft calls the same concept a GUID (Globally Unique Identifier). For practical purposes, UUID and GUID are interchangeable — they refer to the same kind of value.

UUID versions: v1, v4 and friends

Not all UUIDs are created the same way. The number after the "v" tells you how the ID was generated:

  • UUID v1 — based on the current timestamp and the machine's MAC address. Sortable over time, but it leaks when and where the ID was made.
  • UUID v4 — generated from random numbers. No timestamp, no machine info, and the most common choice for general use.
  • UUID v5 — generated from a name (deterministic). The same name always produces the same UUID.

When someone says "generate a UUID" without specifying, they almost always mean v4.

Can two UUIDs collide?

The short answer: practically, no. A v4 UUID has 122 bits of randomness. To have a 50% chance of finding a single collision, you'd need to generate about 2.7 × 1018 of them — roughly a billion UUIDs every second for 85 years. The odds are so low that collision is treated as impossible in real-world systems.

When to use a UUID

  • Database primary keys — especially in distributed systems or when IDs are generated before saving.
  • Session IDs and API tokens — an unguessable ID for a user session or record.
  • Public identifiers — exposing /users/550e8400-… instead of /users/42 hides how many records you have.

How to generate a UUID v4

You can generate one instantly with our free UUID Generator:

  • 1.Open the generator and choose how many UUIDs you need.
  • 2.Click Generate to create cryptographically random v4 UUIDs.
  • 3.Copy the result straight into your code, database, or configuration.

The generation happens locally in your browser using a secure random source — nothing is sent to a server, so the IDs are truly private.

Frequently asked questions

Is a UUID truly unique?

In practice, yes. v4 UUIDs use enough randomness that a collision is effectively impossible. They aren't guaranteed unique the way a central counter is, but the probability of a duplicate is so small it's treated as zero.

What's the difference between UUID and GUID?

They're the same thing. GUID is Microsoft's name for the same 128-bit identifier format; UUID is the more general, standards-based term (RFC 4122).

Should I use UUID v1 or v4?

Use v4 for most cases — it's simpler and doesn't reveal timestamps or hardware addresses. Choose v1 only if you need IDs that sort roughly by creation time.

Need a UUID right now?

Generate as many cryptographically secure UUID v4s as you need with the free UUID Generator.

Generate a UUID