UUID Generator
Generate UUID v4 (random) and v7 (time-ordered) identifiers.
About UUID Generator
The UUID Generator creates universally unique identifiers in both UUID v4 (random) and UUID v7 (time-ordered) formats. Universally Unique Identifiers (UUIDs) are 128-bit identifiers standardized by RFC 4122 and RFC 9562. They are essential for distributed systems where identifiers must be unique without requiring a central coordination service. Unlike auto-incrementing integers, UUIDs can be generated independently on any node in a distributed system without conflicts.
UUID v4 generates identifiers using cryptographically strong random numbers. Each v4 UUID contains 122 bits of random data and 6 bits of version/variant information, giving approximately 5.3 x 10^36 possible values. The probability of collision is negligible for practical purposes. Version 4 is the most widely used UUID variant and is the default choice when you need simple, uniformly distributed unique identifiers with no ordering requirements.
UUID v7 is a newer format (introduced in RFC 9562) that encodes a Unix timestamp in milliseconds as the first 48 bits of the identifier, followed by random data for the remaining bits. This gives v7 UUIDs two advantages: they are monotonically increasing over time (making them ideal for database indexes, especially B-tree indexes), and they encode their creation time, providing temporal ordering without needing a separate timestamp column. For new applications, v7 is generally preferred over v4.
The generator provides flexible output options. You can generate a single UUID or batch-produce hundreds at once. Output can be formatted in standard lowercase with dashes, uppercase with dashes, without dashes, wrapped in curly braces (Microsoft GUID format), or as a URN (`urn:uuid:...`). Each format variant serves different use cases: standard format for JSON APIs, no-dash format for database keys, and curly brace format for COM/OLE compatibility.
Practical use cases for UUIDs include database primary keys in distributed databases, correlation IDs for tracing requests across microservices, session identifiers, entity IDs in event-sourced systems, file names in distributed storage, and API resource identifiers. UUID v7's time-ordered property is particularly valuable for database performance, as it reduces index fragmentation compared to random UUIDs, leading to better insert performance and more compact B-tree indexes.
The tool also includes a UUID decoder that can parse any valid UUID string and identify its version, variant, timestamp (for time-based UUIDs like v1, v6, and v7), the MAC address (for v1 UUIDs that include it), and the clock sequence. This is useful when debugging systems that use different UUID versions or when you need to extract temporal information from a v7 UUID for debugging purposes.
Frequently Asked Questions
What is the difference between UUID v4 and v7?
v4 uses entirely random bits. v7 encodes the current timestamp as a prefix, making them time-ordered and sortable. v7 is generally preferred for database primary keys because it reduces index fragmentation.
Are the generated UUIDs cryptographically secure?
Yes. The generator uses the browser's Crypto API (crypto.getRandomValues) which provides cryptographically strong random numbers suitable for security-sensitive use cases like session tokens.
Can I generate UUIDs in bulk?
Yes. Enter a count (1-10,000) and click Generate. The bulk output can be copied as a list, JSON array, or comma-separated values, depending on your use case.
Does this tool create UUIDs that follow the RFC standard?
Yes. Both v4 and v7 generators follow RFC 4122 and RFC 9562 respectively. The version and variant bits are set according to the standard, and you can validate this using the decoder view.