UUID / GUID Generator

Generate Universally Unique Identifiers (UUIDs) also known as GUIDs. Create version 1 (time-based), version 4 (random), and nil UUIDs in various formats.

UUID / GUID Generator

Generate Universally Unique Identifiers (UUIDs) also known as GUIDs. Create version 1 (time-based), version 4 (random), and nil UUIDs in various formats.


Version 4: Random UUID. Most commonly used. Cryptographically secure random.
Use case: General purpose, web applications, APIs
150100

Common Applications

Database Primary Keys

Unique identifiers for database records that won't conflict during distributed operations

Recommended: v4 recommended

  • No central coordination needed
  • Can generate offline
  • No ID conflicts in replication
Distributed Systems

Unique identifiers across multiple servers, microservices, or data centers

Recommended: v1 or v4

  • Globally unique
  • Time-ordered (v1)
  • No single point of failure
File & Asset IDs

Unique names for files, images, documents in storage systems

Recommended: v4 recommended

  • No naming conflicts
  • Obfuscates sequential access
  • URL-safe when formatted properly
Session & Tracking IDs

Unique identifiers for user sessions, analytics events, logs

Recommended: v4

  • No correlation between IDs
  • Privacy preserving
  • Stateless generation

Technical Specification

UUID Structure
UUID: 123e4567-e89b-12d3-a456-426614174000
       │         │    │    │    │
       │         │    │    │    └── Node (6 bytes: a456-426614174000)
       │         │    │    └─────── Clock sequence (2 bytes: a456)
       │         │    └──────────── Variant & clock seq high (1 byte: 3)
       │         └───────────────── Version & time high (1 byte: d)
       └─────────────────────────── Time low & mid (6 bytes: 123e4567-e89b-12)
Version Comparison
VersionTypeUse When
v1Time-basedNeed ordering, debugging
v4RandomGeneral purpose, security
nilAll zerosTesting, placeholders
Standards & Specifications
  • RFC 4122: UUID URN Namespace
  • ISO/IEC 11578:1996
  • ITU-T Rec. X.667
  • Size: 16 bytes (128 bits)
  • String: 36 characters with hyphens, 32 without
Best Practices

Store UUIDs as BINARY(16) in databases, not as strings. This saves 60% storage space and improves indexing performance.

Use UUID v1 for clustered indexes when you need time-based ordering. For v4 UUIDs, consider using ULID or composite keys to reduce index fragmentation.

Generate UUIDs at the application level, not database level. This allows offline ID generation and reduces database load.
Collision Probability
1 in 5.3×10³⁶

Chance of duplicate v4 UUID


To have 1% probability of collision:
2.71 quadrillion UUIDs

Frequently Asked Questions

UUID (Universally Unique Identifier) or GUID (Globally Unique Identifier) is a 128-bit number used to uniquely identify information in computer systems. It's standardized by RFC 4122.

Version 1: Time-based with MAC address. Version 2: DCE Security. Version 3: MD5 hash. Version 4: Random. Version 5: SHA-1 hash. Our generator supports v1, v4, and nil UUIDs.

Use v1 when you need time-based ordering or want to extract creation time. Use v4 for general purpose where randomness and security are priorities. v4 is most common.

Extremely unique. The probability of a duplicate v4 UUID is about 1 in 2^122 (5.3×10^36). You would need to generate 1 billion UUIDs per second for 85 years to have a 50% chance of collision.

A nil UUID (00000000-0000-0000-0000-000000000000) is a special UUID with all zeros. It's used as a placeholder, for initialization, or in testing scenarios.

v4 UUIDs are cryptographically random and cannot be predicted. v1 UUIDs contain timestamp and MAC address, so they're partially predictable but still unique.

v4 UUIDs are random and can be used as tokens, but for authentication, consider JWT tokens with proper signing and expiration. UUIDs alone don't provide security features.

As 16-byte binary data (most efficient), or as 36-character strings (including hyphens). Most databases have native UUID data types (PostgreSQL UUID, MySQL BINARY(16)).

UUIDs are larger than sequential IDs (16 bytes vs 4-8 bytes), which can impact storage and indexing. Random UUIDs (v4) can cause index fragmentation in databases.