UUID Generator

Generate and validate universally unique identifiers

Select UUID Version

Generate between 1 and 1000 UUIDs at once

Output

Uses Web Crypto API for cryptographically secure random generation. All processing happens locally in your browser.

Enter UUID to Validate

Enter a UUID to check if it is valid and see its details

Component Breakdown

Validates UUID format, version, and variant according to RFC 4122 specification.

Batch Validation

Enter UUID to Convert

Enter a valid UUID to convert it to different formats
All conversions preserve the original UUID value. Different formats are used by different systems and programming languages.

UUID Structure

Version Comparison

Use Case Recommended Version Why
Database primary keys Version 4 Cryptographically random, no collisions
Need temporal sorting Version 1 or ULID Timestamp is encoded in the UUID
Deterministic IDs Version 5 Same input always = same UUID
Distributed systems Version 4 No coordination needed between nodes
Content-based addressing Version 5 UUID derived from content itself

Special UUIDs

NIL UUID 00000000-0000-0000-0000-000000000000
Max UUID ffffffff-ffff-ffff-ffff-ffffffffffff

Code Examples

JavaScript (Browser/Node.js 15+) // Native UUID v4 const uuid = crypto.randomUUID(); // Or using Web Crypto API function generateUUID() { return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) ); }
Python import uuid # Version 4 (random) id = uuid.uuid4() # Version 1 (timestamp) id = uuid.uuid1() # Version 5 (SHA-1 namespace) id = uuid.uuid5(uuid.NAMESPACE_DNS, 'example.com')
PostgreSQL -- Enable extension CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- Generate v4 UUID SELECT uuid_generate_v4(); -- Or use built-in (PostgreSQL 13+) SELECT gen_random_uuid();
C# / .NET // Generate new GUID Guid newGuid = Guid.NewGuid(); // Parse from string Guid parsed = Guid.Parse("550e8400-e29b-41d4-a716-446655440000"); // Format options string formatted = newGuid.ToString("D"); // With hyphens string compact = newGuid.ToString("N"); // No hyphens