UUID (GUID) Generator
Generate valid UUIDs (or GUIDs) for various versions (v1, v3, v4, v5, v7).
-ℹ️ How UUIDs Work
A Universally Unique Identifier (UUID) is a 128-bit number used to identify information in computer systems. This tool allows you to generate several versions:
- Version 1: Generated from a timestamp and a node ID (usually the MAC address).
- Version 3: Generated using an MD5 hash of a namespace and a name.
- Version 4: Generated using random or pseudo-random numbers. This is the most common version.
- Version 5: Generated using a SHA-1 hash of a namespace and a name. More secure than v3.
- Version 7: A new format that combines a Unix timestamp with random bits, providing better performance for database indexing.
- Nil UUID: A special UUID of all zeros (00000000-0000-0000-0000-000000000000).
💡 Real-World Use Cases
Each UUID version has specific use cases:
- Version 1 (Time-based): Used in distributed systems where records are generated on multiple servers and need to be sorted chronologically. For example, Apache Cassandra uses a variant for its `timeuuid` type, ideal for time-series data.
- Version 4 (Random): The most common choice for generating unique identifiers for database records, such as user IDs, transaction IDs, or any other entity that needs a unique key without any inherent meaning.
- Version 5 (Name-based, SHA-1): Used to generate a reproducible UUID from a given name within a namespace. For example, generating a unique ID for a user based on their email address and a namespace for your application.
- Version 7 (Time-ordered): Ideal for primary keys in databases like PostgreSQL and MySQL. Its time-ordered nature improves database index performance, reducing fragmentation and speeding up queries sorted by creation time.
Official Documentation
For more technical details about the different UUID versions, consult the official RFCs (Request for Comments):
⚠️ Usage Notice
The generated UUIDs are for development and testing purposes. While they are unique, do not use them for critical security applications without understanding the implications of each version.
Facts about the UUID Generator
- The UUID Generator creates identifiers in the 8-4-4-4-12 format.
- The tool generates UUIDs in versions v1, v3, v4, v5 and v7.
- Generation is performed in the browser using Web Crypto.
- UUID v7 is chronologically sortable as per RFC 9562.