🔷 UUID Generator

Generate unique identifiers (UUID v4 & v7) — client-side, private, instant

150100

Practical differences between UUID versions

The most common form is version four, which is based on randomness; in practice the chance of a collision stays negligible, so it is a safe default for most applications. Version seven puts the time at the start of the identifier and fills the rest randomly, which lets you sort records by creation order and lets database indexes update more efficiently. The choice of version is a performance decision, not only a formatting one.

Version five hashes a namespace together with a name so the same input always produces the same identifier, which is useful for avoiding duplicate rows during repeated imports. Version one relies on the machine's network address and the clock, and because it can leak the original address it is no longer preferred in new systems. Documenting which version you use in production therefore matters.

Using UUIDs in databases and APIs

The main benefit of a UUID over a sequential integer is that it cannot be guessed, so changing a number in the address bar to reach another record becomes pointless. Random identifiers do disrupt index ordering and spread out insertions, however, so a time-based version or an ordered generation scheme can reduce that cost.

Exposing an identifier in a public API is fine, but authorisation must still be checked on the server for every request; unpredictability alone is not security. If several systems create the same kind of record, fix the format and version up front and apply the same rule everywhere. Avoid linking identifiers to personal data in your logs.

📖 Usage Guide

A UUID is a 128-bit identifier standardized under RFC 4122 and RFC 9562. With 2^128 possible values, the chance of collision is mathematically negligible. These identifiers are unique across space and time without a central authority, making them essential for distributed systems.

UUID v4 is entirely random, offering strong uniqueness but poor database locality because inserts scatter across index pages. UUID v7 encodes a Unix timestamp so records sort roughly by creation time. This reduces page splits in B-tree indexes and improves write performance significantly.

Use UUIDs as primary keys when merging databases or replicating across regions. They serve as opaque API identifiers preventing enumeration attacks. In distributed systems, they identify events in event sourcing without needing a central sequence server.

Our generator runs entirely in your browser using the Web Crypto API. Generate 1 to 100 UUIDs instantly. Nothing is uploaded to any server, so your identifiers remain private and never leave your device.

Use UUID v7 for database primary keys to maintain index-friendly ordering. Reserve UUID v4 for session tokens and security salts where time-ordering is irrelevant. Avoid auto-increment integers in public APIs as they expose row counts.

UUIDs are not guaranteed unique - they are probabilistically unique with collision odds so low they're practically zero. GUID is Microsoft's brand name for the same standard. At 16 bytes the storage overhead is negligible versus the flexibility gained.

❓ Frequently Asked Questions

Answers to the most common questions

🔗 Share this tool

Share this free tool with friends — no signup required