UUID Generator
Generate UUIDs/GUIDs in v1, v4, or v7 format. Bulk generate up to 100 at a time, copy or download.
🔑 Generate UUID
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier represented as 32 hexadecimal digits in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. UUIDs are designed to be globally unique without requiring a central authority — any system can generate a UUID independently with near-zero probability of collision.
UUIDs are used as database primary keys, session identifiers, API idempotency keys, file names, and distributed system identifiers. The term GUID (Globally Unique Identifier) is Microsoft's equivalent name for the same concept.
UUID v4 vs v1 vs v7 — Which Should You Use?
UUID v4 — Random (Most Common)
UUID v4 uses 122 bits of cryptographic randomness. It's the most widely used version because it's simple, has no external dependencies, and provides excellent uniqueness guarantees. Use v4 as your default choice unless you have a specific reason to use another version.
UUID v1 — Time-Based (Legacy)
UUID v1 encodes the current timestamp and a node identifier (originally the MAC address). This makes v1 UUIDs roughly sortable by creation time. However, v1 has privacy concerns (it can reveal when and where it was created) and has been largely superseded by v7.
UUID v7 — Time-Ordered (Modern)
UUID v7 (defined in RFC 9562) encodes the Unix timestamp in milliseconds in the first 48 bits, followed by random data. This gives v7 UUIDs the benefits of time-based sorting without the privacy issues of v1. UUID v7 is the recommended choice for database primary keys because time-ordered IDs dramatically improve B-tree index performance compared to fully random v4 IDs.
Frequently Asked Questions
- What is a UUID?
- A 128-bit identifier (32 hex digits) designed to be globally unique without a central authority. Used for database keys, session IDs, and distributed systems.
- What's the difference between UUID and GUID?
- They are the same thing. UUID is the standard term (RFC 9562). GUID is Microsoft's name. GUIDs are often displayed with braces:
{...}. - Is UUID v4 truly unique?
- For all practical purposes, yes. With 122 random bits (5.3 × 1036 possible values), you'd need to generate quintillions of UUIDs to have a 50% chance of one collision.
- What is UUID v7?
- A modern UUID version (RFC 9562) that encodes a Unix timestamp in the first 48 bits. It's time-sortable, making it ideal for database primary keys where index performance matters.
- Can two UUIDs ever be the same?
- The probability is astronomically small. You'd need to generate billions per second for decades to have a meaningful chance. For all practical applications, UUIDs are unique.