UUID Generator

Generate universally unique identifiers (UUIDs) using timestamp-based algorithms to prevent duplicates.

Keyboard shortcuts: R to regenerate UUID or C to copy it

How UUIDs Work

UUID v1 (Timestamp-based): Uses the current timestamp (100-nanosecond intervals since October 15, 1582) combined with a MAC address or random node identifier. This ensures uniqueness across different machines and prevents duplicates even when generated simultaneously.

UUID v4 (Random): Uses cryptographically strong random numbers. While theoretically possible to have duplicates, the probability is so low (1 in 2^122) that it's negligible for practical purposes.

UUID v7 (Modern Timestamp): The newest UUID version that combines a Unix timestamp (48 bits) with random data (74 bits). This provides the time-sortable benefits of v1 while maintaining the privacy of v4, making it ideal for database primary keys.

Format: UUIDs are 128-bit values displayed as 32 hexadecimal digits in the format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Common Use Cases

UUIDs (also known as GUIDs) give you a practically unlimited pool of unique identifiers without coordinating with a central authority. A few places they are commonly used:

Database primary keys

UUIDs let multiple services or shards generate keys independently without collisions. UUID v7 is increasingly preferred because its leading timestamp keeps inserts locality-friendly and indexes compact.

Distributed systems

When events are produced by many nodes, a UUID per event avoids the bottleneck of a centralized sequence and keeps logs traceable across service boundaries.

Public-facing identifiers

A UUID v4 in a URL does not reveal how many records exist or expose enumeration attacks the way an incrementing integer does.

Idempotency keys

Clients generate a UUID per request so the server can recognize retries and avoid processing the same action twice.

Which Version Should You Use?

  • Use v4 if you want simple randomness with no additional properties - this is the safest default for most applications.
  • Use v7 if the identifier will be a database primary key or stored in any index where insertion order matters. The embedded timestamp makes rows cluster together and dramatically improves write performance at scale.
  • Use v1 only when you specifically need to derive the identifier from a timestamp and node identifier. In modern applications, v7 is a better choice for the same use case without leaking the MAC address.

Frequently Asked Questions

What is a UUID?

A UUID (universally unique identifier) is a 128-bit value, usually written as 32 hexadecimal digits in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Different versions generate the value using different strategies (random, timestamp, or both).

What is the difference between UUID and GUID?

They refer to the same thing. GUID (globally unique identifier) is the name used in the Microsoft ecosystem; UUID is the name used in RFC 4122 and everywhere else. The format and uniqueness guarantees are identical.

Are UUIDs guaranteed to be unique?

Not mathematically guaranteed - but the collision probability for UUID v4 is roughly 1 in 2^122, which is far below the threshold for any practical application. For UUID v1 and v7, the timestamp and node/random bits prevent collisions in practice.

Should I use UUID v4 or UUID v7 for database primary keys?

UUID v7 is generally better for primary keys. Because its leading bits are a Unix timestamp, new rows insert near each other on disk, which keeps indexes compact and writes fast. Use v4 only when insertion order absolutely must not be inferable.

Do I need a UUID v1 generator?

Rarely. UUID v1 includes the generating machine's MAC address (or a random substitute), which can leak information. UUID v7 offers the same time-sortable property without that concern and is almost always the better choice today.

Is this UUID generator free to use?

Yes. All generation happens in your browser, there is no rate limit, and no account is required. You can generate individual UUIDs here or switch to the bulk generator for up to 500 at a time.

We barely use cookies

We only use strictly necessary cookies, that enhance website security and improve user experience. We don't track your actions or activity.