UUID Generator
Generate universally unique identifiers (UUIDs) with support for versions 1, 3, 4, and 5.
About UUID Versions
Format: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
Where M is the version (1-5) and N indicates the variant.
Frequently Asked Questions
What is a UUID and why is it used in software development?
UUID (Universally Unique Identifier) is a 128-bit identifier guaranteed to be unique across space and time. Used extensively in databases for primary keys, distributed systems for entity identification, API request tracking, session management, and file naming. UUIDs eliminate ID collision risks when merging data from multiple sources or generating IDs across distributed systems.
What is the difference between UUID v1, v3, v4, and v5?
UUID v1 uses timestamp and MAC address (time-based, predictable). V3 uses MD5 hash of namespace and name (deterministic but deprecated). V4 uses random generation (most common, unpredictable). V5 uses SHA-1 hash of namespace and name (deterministic, preferred over v3). For most applications, use v4 for randomness or v5 for reproducible IDs.
How do name-based UUIDs (v3 and v5) work with namespaces?
V3 and v5 generate UUIDs by hashing a namespace UUID with a name string. Same namespace + name always produces identical UUID, enabling reproducible IDs. Predefined namespaces include DNS (domain names), URL (web addresses), OID (object identifiers), and X.500 DN (directory names). Custom namespaces require a valid UUID as the namespace parameter.
Are UUIDs truly unique and collision-free?
UUID v4 has 122 random bits, making collision probability astronomically low (1 in 2^122). You'd need to generate billions of UUIDs per second for thousands of years to have even a tiny collision chance. For practical purposes, v4 UUIDs are considered unique. V1, v3, and v5 deterministic generation methods also ensure uniqueness through their design.
Can I use UUIDs as database primary keys?
Yes! UUIDs are excellent for distributed databases, prevent ID conflicts when merging datasets, and allow client-side ID generation. However, they're larger (16 bytes vs 4-8 bytes for integers) and random UUIDs (v4) cause index fragmentation. Consider ordered UUIDs (v1, v6, v7) for better database performance while maintaining uniqueness benefits.
How do I generate multiple UUIDs at once?
Set the "Number of UUIDs to generate" field to any value between 1 and 100, then click Generate. The tool creates all UUIDs instantly and displays them in a list. Use "Copy All" to copy all UUIDs at once (one per line), or click individual Copy buttons for specific UUIDs. Perfect for bulk data seeding, testing, or creating unique identifiers.