UUID Generator
Generate universally unique identifiers (UUIDs) online. Supports v4 (random), v1 (time-based), and bulk generation. Validate any UUID instantly.
UUID v4 — Randomly Generated
Generated using crypto.randomUUID() — cryptographically secure randomness.
UUID v1 — Time-based (Simulated)
Uses current timestamp + random node ID. Not a true RFC 4122 v1 (no MAC address), but follows the same format.
Bulk UUID Generation
UUID Validator
Paste any UUID to validate its format and detect its version.
What Is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit label used to uniquely identify information in computer systems. Standardised as RFC 4122, UUIDs are represented as 32 hexadecimal digits grouped by hyphens: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx.
The M digit indicates the version (1–5) and N indicates the variant. v4 UUIDs use random data and are the most widely used type.
What is a UUID Generator?
A UUID (Universally Unique Identifier) generator produces 128-bit values used to uniquely identify information in computer systems without requiring a central registration authority — two independently generated UUIDs are, for all practical purposes, guaranteed to be unique even across billions of IDs generated at different times and on different machines. UUIDs are defined by RFC 4122 and formatted as 32 hexadecimal characters grouped in the pattern xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx, where M indicates the UUID version and N indicates the variant. Version 4 UUIDs, the most widely used, consist of 122 random bits with only the version and variant bits fixed — the probability of generating two identical v4 UUIDs is approximately 1 in 5.3 × 10³⁶.
RFC 4122 defines five UUID versions with different generation methods. Version 1 uses the current timestamp combined with the generating machine's MAC address, making IDs time-ordered and machine-traceable — useful for distributed systems that need chronological ordering but problematic for privacy. Version 3 and Version 5 are name-based, generating a deterministic UUID from a namespace and name using MD5 (v3) or SHA-1 (v5) hashing — the same input always produces the same UUID, useful for content-addressable identifiers. Version 4 is purely random. Newer versions 6 and 7 (draft RFC 9562) introduce lexicographically sortable timestamp-based formats that combine the time-ordering benefits of v1 with the privacy safety of randomness.
UUID generators are used wherever unique identifiers are needed without coordination with a central authority: database primary keys for distributed systems that can't use auto-increment sequences across shards, API resource identifiers in RESTful services, session and CSRF tokens in web applications, file naming in content storage systems, distributed tracing correlation IDs, and event sourcing event IDs. The ability to generate a unique ID client-side or at the application layer — without a database round-trip to obtain an auto-incremented ID — is a significant architectural advantage in high-scale and microservices architectures.
How the UUID Generator Works
Formula, assumptions, and calculation steps for this dev tools tool.
Formula Used
UUID v4 uses 122 random bits formatted as 8-4-4-4-12 hex digits per RFC 4122
Methodology
Generates 122 bits of randomness and formats them into the standard 8-4-4-4-12 hexadecimal UUID pattern defined by RFC 4122.
Calculation Steps
- Provide the input text or select generation options.
- Apply the selected encoding, parsing, hashing, or formatting rule.
- Validate the output where possible.
- Return copy-ready developer output.
Assumptions and Limits
- Generated or transformed output depends exactly on the supplied input.
- Security-sensitive values should be handled carefully.
- Browser tools do not replace production validation.
Frequently Asked Questions
UUID v1 is generated from the current timestamp and the MAC address of the machine, making it time-ordered but potentially traceable. UUID v4 is entirely random (122 random bits), making it unpredictable and privacy-safe. v4 is recommended for most use cases.
Yes, for all practical purposes. With 2^122 possible values (~5.3 × 10^36), the probability of generating two identical v4 UUIDs is astronomically small. You would need to generate about 2.7 × 10^18 UUIDs before having a 50% chance of a collision.
Yes. UUIDs are commonly used as primary keys, especially in distributed systems where auto-increment integers would cause conflicts. The trade-off is slightly larger storage (16 bytes vs 4–8 bytes for integers) and reduced index locality for v4 UUIDs. UUID v7 (time-ordered random) is gaining popularity for databases.
The nil UUID (00000000-0000-0000-0000-000000000000) is a special UUID with all 128 bits set to zero. It is typically used as a sentinel or placeholder value to represent the absence of a real UUID, similar to null in programming.
Real-World Applications
Common Mistakes
UUID Versions Quick Reference
| Version | Generation Method | Best Use |
|---|---|---|
| v1 | Timestamp + MAC address | Time-ordered; avoid for user-facing IDs |
| v3 | MD5 hash (namespace + name) | Deterministic, name-based IDs |
| v4 | Random (122 bits) | Most common; session IDs, database PKs |
| v5 | SHA-1 hash (namespace + name) | Deterministic, name-based IDs |
| v7 | Unix timestamp + random | Sortable; best for DB primary keys |
References
- Leach, P. et al. RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace. IETF, 2005.
- Davis, K. et al. RFC 9562: Universally Unique IDentifiers (UUIDs). IETF, 2024.
- NIST. SP 800-90A: Recommendation for Random Number Generation Using Deterministic Random Bit Generators. nist.gov, 2015.
- Percona. UUID vs Auto-Increment: Primary Key Comparison. percona.com, 2023.
- ISO/IEC 9834-8. Procedures for the operation of OSI Registration Authorities: Generation and registration of UUIDs. iso.org, 2014.
Related Calculators
Browse all Dev Tools calculators →Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes from any text.
Random Picker
Pick random items from any list — names, options, or custom entries.
Base64 Encoder/Decoder
Encode and decode text or files to and from Base64 instantly.