🆔

UUID/GUID Generator

Generate, validate, and format UUIDs (v1, v4, v5) with support for multiple output formats.

Generate UUID

Random UUID generated from random numbers

Validate UUID

Special UUIDs

NIL UUID

All zeros UUID (special case)

00000000-0000-0000-0000-000000000000

What is a UUID?

A UUID (Universally Unique Identifier), also known as a GUID (Globally Unique Identifier), is a 128-bit value designed to be unique across all systems worldwide. UUIDs follow the RFC 4122 standard and are represented as a 32-character hexadecimal string divided into five groups separated by hyphens: 8-4-4-4-12. Unlike sequential IDs that require centralized coordination, UUIDs can be generated independently on any system without collision, making them ideal for distributed databases, microservices, and cloud applications where generating unique identifiers without network coordination is essential.

UUIDs come in five versions, each designed for different use cases. Version 1 (v1) uses timestamp and MAC address, v3 uses MD5 hashing of a namespace and name, v4 generates random values, v5 uses SHA-1 hashing with a namespace, and v6 improves sortability with timestamp-based layout. The most commonly used versions are v4 (random, no dependencies) and v5 (deterministic, reproducible from inputs), while v1 is older and less secure due to MAC address exposure.

Common Use Cases

  • Database Primary Keys: Use v4 UUIDs as primary keys in distributed databases where auto-increment is impractical or generates collisions across multiple nodes. UUIDs eliminate the need for centralized ID generation servers.
  • Session Tokens: Generate unique v4 UUIDs for user session identifiers and authentication tokens. Each login session gets a guaranteed-unique identifier that's impossible to guess or brute-force.
  • Request Tracing: Assign a UUID to each API request for distributed tracing across microservices. This allows engineers to follow a single user action through multiple backend services and identify bottlenecks.
  • File Names: Use v4 UUIDs to generate unique file names when accepting uploads. This prevents filename collisions, ensures security by avoiding predictable paths, and works across distributed file systems.
  • Message IDs: Generate v5 UUIDs deterministically from message content for deduplication in message queues. The same message always produces the same UUID, preventing duplicate processing.

How to Use This Tool

  1. Choose Version: Select v1 (timestamp-based), v4 (random), or v5 (namespace-based). V4 is recommended for most use cases due to its simplicity and cryptographic randomness.
  2. Set Format: Select standard (with hyphens), no-hyphens (compact), braces (Windows GUID format), or URN (RFC 8141 format). Different databases and systems expect different formats.
  3. Configure Case: Choose lowercase or UPPERCASE depending on your system's requirements. Most modern systems prefer lowercase for consistency.
  4. Generate UUIDs: For bulk generation, set quantity (1-1000) to create multiple UUIDs at once. Useful for pre-populating databases or batch processing.
  5. Validate Existing UUIDs: Paste any UUID into the validation section to check its format, detect its version, and verify it conforms to RFC 4122 standards.

Features

Multiple Versions

Generate v1 (timestamp-based), v4 (random), or v5 (name-based) UUIDs. Each version has specific use cases and characteristics suited for different application scenarios.

Bulk Generation

Create up to 1000 UUIDs in a single batch. Ideal for database population, bulk imports, or generating testing fixtures without manual repetition.

Format Control

Output in standard (with hyphens), no-hyphens (compact 32-char), braces (Windows GUID), or URN formats. Convert between formats to match your system requirements.

UUID Validation

Validate any UUID for RFC 4122 compliance and automatically detect its version. Useful for debugging and verifying UUIDs from external sources.

Frequently Asked Questions

What is the difference between UUID and GUID?

UUID (Universally Unique Identifier) is the standardized term defined by RFC 4122, while GUID (Globally Unique Identifier) is Microsoft's proprietary term for the same thing. They are functionally identical—the difference is purely nomenclature based on the system or platform using the term. Most modern systems prefer the RFC-standard term "UUID".

Are UUIDs truly unique?

Yes, for practical purposes. The statistical probability of UUID collision is astronomically small. For v4 UUIDs using cryptographically secure randomness, you would need to generate 2.71 quintillion UUIDs before the probability of a single collision reaches 50%. This makes collisions virtually impossible in any real-world application.

What is the difference between UUID v4 and v5?

V4 is completely random—the same input produces different UUIDs each time. V5 is deterministic—the same namespace and name always produce the same UUID, making it ideal for deduplication and idempotent operations. Use v4 for random IDs and v5 when you need reproducible, derived identifiers.

Can I use UUIDs as database primary keys?

Yes, UUIDs work well as primary keys, especially in distributed databases where auto-increment is problematic. However, they're slightly slower than sequential integers because they don't cluster data on disk. For maximum performance in single-database scenarios, consider using sequential UUIDs (v1 or v6) which maintain temporal ordering.

What is a NIL UUID?

The NIL UUID is a special UUID with all zeros: 00000000-0000-0000-0000-000000000000. It's used as a sentinel value in certain contexts, similar to NULL in databases, to represent "no value" or "undefined". Some systems treat it as invalid, so use it carefully in production code.