UUID/GUID Generator

Generated UUIDs

Click "Generate UUID(s)" to create new UUIDs

How to Use the UUID Generator

Step 1: Choose Version

Select UUID v4 (random) for most use cases, or v1 (time-based) when you need sortable, chronological identifiers.

Step 2: Select Format

Pick your preferred output format: standard with hyphens, uppercase, no hyphens, or wrapped in braces for GUID notation.

Step 3: Generate & Copy

Click Generate to create UUIDs. Click on any UUID to copy it individually, or use Copy All to get all UUIDs at once.

About UUIDs

What is a UUID?

A UUID (Universally Unique Identifier) or GUID (Globally Unique Identifier) is a 128-bit identifier that is unique across all devices and time. They are commonly used in databases, distributed systems, and anywhere unique identification is needed.

UUID Version 4 (Random)

Generated using random or pseudo-random numbers. Most commonly used version. Provides approximately 122 bits of randomness, making collisions extremely unlikely.

UUID Version 1 (Time-based)

Generated using the current timestamp and MAC address (or random node ID). Useful when you need sortable, time-ordered identifiers. Note: May expose generation time.

UUID Format

Standard format: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx where M indicates the version and N indicates the variant. Total 36 characters including hyphens.

Frequently Asked Questions

What is the difference between UUID v1 and v4?

UUID v4 uses random numbers, making it completely unpredictable and the most common choice for general use. UUID v1 uses the current timestamp and MAC address, creating sortable, time-ordered identifiers. v4 is preferred when you don't want to reveal generation time or device information.

How unique is a UUID?

UUIDs are designed to be globally unique. A UUID v4 has 122 random bits, meaning the probability of generating two identical UUIDs is about 1 in 5.3 x 10^36. You could generate 1 billion UUIDs per second for 85 years before having a 50% chance of one collision.

Can I use UUIDs as database primary keys?

Yes, UUIDs are commonly used as primary keys, especially in distributed systems. They allow generating unique IDs without a central authority. However, consider that UUIDs are larger than auto-incrementing integers and may impact index performance.

What is the standard UUID format?

The standard format is 8-4-4-4-12 hexadecimal digits separated by hyphens, like 550e8400-e29b-41d4-a716-446655440000. This equals 36 characters including hyphens, or 32 hex characters without them.

Horizontal Banner (Responsive) 728x90 / 320x100

How to Use This Tool

  1. Select UUID Version: Choose Version 4 (Random) for general-purpose unique identifiers with no embedded information. Select Version 1 (Time-based) when you need chronologically sortable IDs or want to embed the generation timestamp.
  2. Choose Output Format: Standard format uses lowercase with hyphens (8-4-4-4-12). Select Uppercase for systems requiring capital letters, No Hyphens for compact storage, or Braces for Microsoft GUID notation.
  3. Set Quantity: Generate 1 to 100 UUIDs at once using the quantity dropdown. Bulk generation is useful for seeding databases or pre-allocating identifiers for batch operations.
  4. Generate and Copy: Click "Generate UUID(s)" to create new identifiers. Click any individual UUID to copy it, or use "Copy All" to get all generated UUIDs separated by newlines for easy pasting into spreadsheets or code.

Technical Details

UUID Version 4 uses 122 bits of cryptographically random data (6 bits are reserved for version and variant identifiers). The probability of generating two identical v4 UUIDs is approximately 1 in 2^122, or about 5.3 × 10^36. You could generate 1 billion UUIDs per second for 85 years before having a 50% probability of a single collision.

UUID Version 1 embeds a 60-bit timestamp (100-nanosecond intervals since October 15, 1582) and a 48-bit node identifier (typically the MAC address). This enables chronological sorting and extraction of generation time, but exposes the creating machine's identity. The timestamp component wraps around approximately every 3,400 years. For distributed systems requiring both uniqueness and ordering, consider UUIDv7 (not yet widely standardized) which combines timestamp ordering with random components while avoiding MAC address exposure.

Common Mistakes to Avoid

  • Using UUIDs as Security Tokens: While UUIDv4 is random, it's not designed for security-sensitive applications like session tokens. For authentication, use cryptographically secure random bytes with sufficient entropy (at least 128 bits) through your platform's secure random generator.
  • Assuming Database Index Efficiency: Random UUIDs cause index fragmentation in B-tree databases. For high-insert workloads, consider UUIDv1/v7 for better insert performance, or use sequential IDs with a UUID lookup table.
  • Ignoring Case Sensitivity: While UUIDs are case-insensitive per RFC 4122, some systems treat them as case-sensitive strings. Normalize to lowercase before storage and comparison to avoid duplicate key errors.

Related Tools

Need a cryptographic hash instead of a unique identifier? Try the Hash Generator for MD5, SHA-256, and SHA-512 computations. For scheduling tasks that use these IDs, the Cron Expression Generator helps build automation schedules.

Frequently Asked Questions

What is the difference between UUID v1 and v4?

UUID v4 uses random numbers, making it completely unpredictable and the most common choice for general use. UUID v1 uses the current timestamp and MAC address, creating sortable, time-ordered identifiers. v4 is preferred when you don't want to reveal generation time or device information.

How unique is a UUID?

UUIDs are designed to be globally unique. A UUID v4 has 122 random bits, meaning the probability of generating two identical UUIDs is about 1 in 5.3 x 10^36. You could generate 1 billion UUIDs per second for 85 years before having a 50% chance of one collision.

Can I use UUIDs as database primary keys?

Yes, UUIDs are commonly used as primary keys, especially in distributed systems. They allow generating unique IDs without a central authority. However, consider that UUIDs are larger than auto-incrementing integers and may impact index performance.

What is the standard UUID format?

The standard format is 8-4-4-4-12 hexadecimal digits separated by hyphens, like 550e8400-e29b-41d4-a716-446655440000. This equals 36 characters including hyphens, or 32 hex characters without them.