UUID Generator & Decoder
Generate UUID v4 (random) or v7 (time-sortable). Decode any UUID to see its version, variant, and timestamp. Bulk export up to 1,000.
v4 — random 122-bit identifier. Use for general-purpose IDs.
b7bbbd11-4d1a-4fb9-935f-749e45482b7cWhat is a UUID?
A UUID (Universally Unique Identifier), also called a GUID (Globally Unique Identifier), is a 128-bit number used to uniquely identify resources in computer systems without coordination between systems. UUIDs are written as 32 hexadecimal digits grouped 8-4-4-4-12, separated by hyphens — for example,550e8400-e29b-41d4-a716-446655440000. They're used as primary keys in distributed databases, request IDs in microservices, asset IDs in CMSes, and identifiers in protocols like Zigbee, OAuth, and SAML.
UUID versions explained
| Version | Based On | Use Case |
|---|---|---|
| v1 | Timestamp + MAC address | Time-ordered records (leaks MAC address — avoid) |
| v3 | MD5 hash of namespace + name | Deterministic IDs (MD5 — prefer v5) |
| v4 | Random numbers (122 bits of entropy) | General purpose, most common |
| v5 | SHA-1 hash of namespace + name | Deterministic IDs from input |
| v6 | Reordered v1 for sortability | Time-sortable, MAC-based (rare) |
| v7 | Unix ms timestamp + random | Time-sortable, database-friendly (RFC 9562) |
| v8 | Custom / implementation-defined | Application-specific encoding |
Frequently Asked Questions
Should I use UUID v4 or v7 for my database?
Use v7 for primary keys in databases. v7 UUIDs sort chronologically, which dramatically improves B-tree index performance (you avoid the random-write penalty of v4 — newer rows always insert at the end of the index, not scattered). Use v4 only when you need to avoid leaking creation time, or when sorting doesn't matter.
Can two UUIDs be the same?
Theoretically possible but astronomically unlikely. A v4 UUID has 2^122 possible values (about 5.3 × 10^36). You would need to generate 1 billion UUIDs per second for 100 years to have a 50% chance of a single collision. For practical purposes, treat collisions as impossible.
What is the difference between UUID and GUID?
They're the same thing. GUID is Microsoft's name for UUID, used in .NET, COM, and Windows APIs. The byte ordering can differ in some Microsoft formats (mixed-endian for the first three fields), but the string representation is identical across UUID and GUID.
How do I validate a UUID?
Paste it into the "Decode / Validate" tab above. A valid UUID matches the regex/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i. The tool also detects the version (4th group's first digit), the variant (5th group's first digit), and extracts the timestamp from v1 and v7 UUIDs.
What are NIL and MAX UUIDs?
NIL UUID (00000000-0000-0000-0000-000000000000) is a special UUID with all zero bits. Used as a sentinel for "no value" or "unknown".MAX UUID (ffffffff-ffff-ffff-ffff-ffffffffffff, defined in RFC 9562) is all one bits — useful as an "upper bound" sentinel in range queries.
Is generating UUIDs in the browser secure?
Yes. This tool uses crypto.randomUUID() and crypto.getRandomValues(), both of which use the operating system's cryptographically-secure RNG (CSPRNG). Output is suitable for production use — the same source modern Node.js, .NET, and Go use server-side.
Why does v7 expose creation time?
By design — v7 trades a small information leak (the row was created at time X) for huge database performance gains. If creation time is sensitive (e.g., security audit logs visible to attackers), stick with v4. For 99% of CRUD applications, v7's time leak is irrelevant.