โœ… Copied!
โš™๏ธ UUID Settings
๐Ÿ“‹ Generated UUIDs
๐Ÿ”ข Click Generate to create UUIDs.

What Is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify objects, records, or sessions in computer systems. UUIDs are standardized by RFC 4122 (now superseded by RFC 9562) and are guaranteed to be unique across both space and time without requiring a central registry.

UUIDs are typically displayed as 32 hexadecimal digits arranged in five groups separated by hyphens:

550e8400-e29b-41d4-a716-446655440000

How to Use This Tool

  • Pick a version โ€” v4 (random), v7 (time-based sortable), or v1 (legacy).
  • Choose quantity โ€” 1 to 1000 UUIDs in a single click.
  • Set format options โ€” uppercase, no braces, no hyphens, or URN format.
  • Click Generate โ€” see the results immediately.
  • Copy or download โ€” as plain text, JSON, or CSV.

UUID Versions Compared

Version How It's Made Best For Drawback
v1 Timestamp + MAC address + random Legacy systems, MAC-based identification Leaks hardware info; not sortable across machines
v4 Cryptographic random (122 bits) General-purpose IDs, security tokens, sessions Not sortable โ€” random order
v7 Unix timestamp (48 bits) + random Database primary keys, event logs, distributed systems Newer, less universally supported

Version 4 โ€” Random UUIDs

Version 4 UUIDs are the most common. They use a cryptographically secure random number generator for 122 of the 128 bits (the remaining 6 bits identify the version and variant). The chance of a collision is effectively zero โ€” you'd need to generate 2.71ร—10ยนโธ UUIDs before hitting a 50% chance of any duplicate.

This tool uses the browser's crypto.randomUUID() when available, falling back to crypto.getRandomValues() for older browsers.

Version 7 โ€” Sortable Time-Based UUIDs

Version 7 was standardized in RFC 9562 (2024) to solve a common database problem: random UUIDs scatter inserts across a B-tree index, hurting performance. v7 UUIDs begin with a 48-bit Unix timestamp (in milliseconds), so they sort chronologically at the string level.

This makes them ideal as database primary keys โ€” new rows always append to the end of the index rather than scattering randomly. They still contain 74 bits of random data, so they remain unique across distributed systems.

Version 1 โ€” Legacy Timestamp + MAC

Version 1 combines the current timestamp with the machine's MAC address. It was the original UUID format and is still used in some legacy systems. However:

  • Privacy concern โ€” the MAC address is embedded, revealing which machine generated it
  • Not distributed-safe โ€” duplicate MAC addresses would cause collisions
  • Sortability depends on clock โ€” clocks on different machines may disagree

For new projects, prefer v4 or v7.

UUID Format Rules

A standard UUID has this structure:

  • 8 hex digits โ€” group 1
  • 4 hex digits โ€” group 2
  • 4 hex digits โ€” group 3 (first digit is the version number)
  • 4 hex digits โ€” group 4 (first digit is 8, 9, A, or B โ€” the variant)
  • 12 hex digits โ€” group 5

Total: 32 hex digits = 128 bits = 16 bytes.

Format Options Explained

  • Uppercase โ€” 550E8400-E29B-41D4-A716-446655440000
  • No braces โ€” removes the {...} wrapper that some systems use
  • No hyphens โ€” 550e8400e29b41d4a716446655440000 (used in URLs and some databases)
  • URN format โ€” urn:uuid:550e8400-e29b-41d4-a716-446655440000 (used in XML and RDF)

Common Use Cases

  • Database primary keys โ€” especially v7 for time-ordered inserts
  • Session tokens โ€” v4 for unpredictable session IDs
  • Request tracing โ€” one UUID per HTTP request for logging
  • File naming โ€” unique identifiers for uploaded files
  • Distributed systems โ€” generating IDs without central coordination
  • API idempotency keys โ€” preventing duplicate operations
  • Testing โ€” generating mock IDs for fixtures

UUID vs GUID

GUID (Globally Unique Identifier) is Microsoft's name for UUID. They're the same thing โ€” 128-bit identifiers following the same format. The only practical difference is terminology, and sometimes the braces style ({...}) that Windows uses.

Is a UUID Really Unique?

Yes โ€” in practice. v4 UUIDs have 122 random bits, giving 5.3ร—10ยณโถ possible values. The probability of a collision is so low that:

  • You'd need to generate 1 billion UUIDs per second for 100 years to reach a 50% chance of any collision
  • Even at trillions per second, you'd hit collisions only after billions of years
  • Real systems treat UUID collisions as impossible for practical purposes

Best Practices

  • Use v4 for security tokens โ€” unpredictability matters.
  • Use v7 for database keys โ€” sortability improves insert performance dramatically.
  • Store as string or binary โ€” 36-character string or 16-byte binary. Binary is more efficient.
  • Don't expose UUIDs โ€” they leak count and timing info if they're sequential (v1, v7). For public-facing IDs, use v4 or a non-sequential format.
  • Don't use UUIDs for human-readable IDs โ€” they're ugly. Use a slug or short code for UI.
  • Consider ULID โ€” an alternative to UUID that's also sortable but uses Base32 encoding (shorter strings).

Frequently Asked Questions

  • Are these UUIDs truly unique? โ€” Yes. They use cryptographically secure randomness.
  • Are they RFC-compliant? โ€” Yes. v4 follows RFC 4122, v7 follows RFC 9562.
  • Can I generate more than 1000? โ€” The tool is capped at 1000 to keep the browser responsive.
  • Do UUIDs expire? โ€” No. They're static once generated.
  • Which version should I use? โ€” v4 for most uses, v7 for database keys in modern systems.
  • Is UUID generation free? โ€” Yes. Completely free with no limits.

Related Tools

Privacy Note

Everything runs in your browser using the built-in crypto API. No UUIDs are transmitted, stored, or logged. Close the tab and everything is gone.