Generators

UUID Generator

Generate UUIDs (v1, v4, v5, v7) in bulk. Validate and detect UUID versions.

Click Generate to create UUIDs

What Is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit identifier formatted as 32 hexadecimal characters in five groups separated by hyphens: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. UUIDs are designed to be globally unique without requiring a central authority — you can generate them independently on any device and be virtually certain they won't collide with any other UUID ever generated.

UUIDs are used everywhere in software: as database primary keys, API resource identifiers, session tokens, distributed system correlation IDs, and file system identifiers. Different UUID versions serve different purposes — v4 is purely random, v1 is time-based, v5 is derived from a namespace and name, and v7 is the newest version designed for database-friendly sortable identifiers.

This UUID generator supports versions 1, 4, 5, and 7. Generate single UUIDs or bulk batches of up to 50. Validate any UUID string and detect its version and variant. Choose uppercase or lowercase formatting. All UUIDs are generated using the Web Crypto API in your browser — no server involved, and your generated identifiers are never logged or stored.

How to Generate and Validate UUIDs

  1. Select a UUID version — Choose v1 (time-based), v4 (random), v5 (name-based), or v7 (sortable) depending on your use case.
  2. Choose a batch size — Generate 1, 5, 10, 25, or 50 UUIDs at once. Toggle uppercase formatting if your system requires it.
  3. For v5: configure namespace and name — Select a standard namespace (DNS, URL, OID, X.500) or enter a custom namespace UUID, then enter the name string to hash.
  4. Generate and copy — Click Generate to create your UUIDs. Copy individual UUIDs by hovering and clicking "Copy", or copy all at once with "Copy All".
  5. Validate existing UUIDs — Paste any UUID into the validation section to check if it's valid and detect its version (1-7) and variant (RFC 4122, NCS, Microsoft).

UUID Versions Explained

  • UUID v1 (time-based) — Combines a timestamp (100-nanosecond intervals since October 1582) with a clock sequence and node identifier. Guarantees uniqueness but can leak timing information. Good for: audit logs, event ordering.
  • UUID v4 (random) — Generated from 122 bits of cryptographic randomness. The most commonly used version. Has a collision probability of about 1 in 2^122 (practically impossible). Good for: database keys, session IDs, general-purpose identifiers.
  • UUID v5 (name-based, SHA-1) — Deterministically generated from a namespace UUID and a name string using SHA-1 hashing. The same inputs always produce the same UUID. Good for: URL-to-ID mapping, content addressing, idempotent ID generation.
  • UUID v7 (sortable, RFC 9562) — The newest standard, combining a Unix timestamp in milliseconds with random bits. UUIDs sort chronologically, making them excellent for database primary keys. Good for: database indexes, time-ordered records, distributed systems.
  • Validation and detection — The validator checks format correctness and identifies the UUID version (from the 13th hex digit) and variant (from the 17th hex digit). It also recognizes nil UUIDs (all zeros) and max UUIDs (all ones).

Common Use Cases

  • Database primary keys — Use v4 for random keys or v7 for sortable keys that don't cause B-tree index fragmentation. v7 is increasingly recommended for PostgreSQL, MySQL, and other databases.
  • API resource identifiers — UUIDs as API IDs prevent enumeration attacks (unlike sequential integers) and work across distributed services without coordination.
  • Distributed systems — Generate unique IDs across multiple servers without a central ID service. Every node can generate UUIDs independently with no collision risk.
  • Idempotency keys — Use v5 to generate deterministic IDs from request parameters, ensuring the same operation always maps to the same UUID for deduplication.
  • Session and correlation tracking — Assign UUIDs to user sessions, distributed traces, or log correlation IDs for tracking requests across microservices.

Frequently Asked Questions

🔒 This tool runs entirely in your browser. No data is sent to any server.