UUID Generator
Generate UUID v4 (random) and UUID v1 (timestamp-based) identifiers. Bulk generate up to 100 at once, copy individually or all at once. Everything runs in your browser — nothing is sent to any server.
Related Tools
Frequently Asked Questions
What is the practical difference between UUID v4 and UUID v7 for database primary keys?▾
UUID v4 is 122 bits of pure randomness. Because rows are inserted with random primary keys, they scatter across a B-tree index, causing page splits, cache misses, and degraded write performance at scale. UUID v7 (RFC 9562, 2024) embeds a Unix epoch millisecond timestamp in the most-significant bits followed by random bits, making generated IDs monotonically increasing. Inserts go to the end of the index like an auto-increment integer, preserving cache locality. For database primary keys in any modern system, prefer v7. Use v4 when ordering is irrelevant and privacy is the priority (API keys, session tokens).
What privacy risk does UUID v1 carry that v4 and v7 do not?▾
UUID v1 encodes the MAC address of the network interface on the machine that generated it, along with a 60-bit timestamp. This means a v1 UUID reveals when and on which machine it was created — a concrete privacy and security risk in public-facing APIs. It can fingerprint servers, help attackers correlate events to specific infrastructure, or leak timing information. UUID v4 contains no hardware or time information. UUID v7 contains a timestamp but no hardware identifier. Avoid v1 in any context where generated IDs are exposed externally.
What is a UUID v5 and when would you generate the same UUID intentionally?▾
UUID v5 is deterministic — given the same namespace UUID and the same input string, it always produces the same UUID. It computes a SHA-1 hash of the concatenation of namespace + name, formatted as a UUID. This makes it ideal for content-addressable identifiers: generating a stable ID for a URL, email address, or product SKU without storing a lookup table. Standard namespaces are defined in RFC 4122: DNS (6ba7b810-...), URL (6ba7b811-...), OID, and X.500.
How unique is UUID v4 — what is the real collision probability?▾
UUID v4 has 122 bits of randomness (6 bits are fixed for version/variant). The probability of a collision between two randomly generated UUIDs is approximately 1 in 2¹²² ≈ 5.3 × 10⁻³⁷. To have a 50% probability of a single collision, you would need to generate approximately 2.7 × 10¹⁸ UUIDs. At one billion UUIDs per second, that would take about 85 years. For virtually all production systems, v4 collision probability is negligible — provided the generator uses a CSPRNG (cryptographically secure pseudo-random number generator), not Math.random().
Is a UUID the same thing as a GUID?▾
Yes, functionally. GUID (Globally Unique Identifier) is Microsoft's term, introduced with COM/OLE in the early 1990s. UUID (Universally Unique Identifier) is the term used in the IETF standard (RFC 4122, updated by RFC 9562). Both describe the same 128-bit identifier in the xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx format. GUID is used in .NET and Windows ecosystems; UUID is used everywhere else. System.Guid.NewGuid() in .NET generates a UUID v4.