UUID Generator
Generate one or more UUID values and copy the results directly from the output panel.
Generator settings
Generated UUID values
UUID result
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier standardised by RFC 4122 and represented as a 32-character hex string divided by hyphens: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx. The M digit indicates the version and the N digit indicates the variant. Microsoft calls the same format a GUID (Globally Unique Identifier) — the two terms refer to the exact same specification. UUIDs are designed to be generated independently on different machines without any central coordination and still be unique.
UUID versions compared
- v1 (time-based): Combines the current timestamp with the machine's MAC address. Guaranteed unique and time-sortable, but leaks the generating machine's MAC address and the creation time — a privacy concern in some contexts.
- v3 (name-based, MD5): Deterministically generates a UUID by hashing a namespace and a name with MD5. The same namespace + name always produces the same UUID. Useful for consistent identifiers for known entities like URLs.
- v4 (random): 122 bits of cryptographically random data with 6 bits reserved for version and variant. This is the most widely used version and the one generated by this tool. No information about the generating machine or time is embedded.
- v5 (name-based, SHA-1): Like v3 but uses SHA-1 for hashing. Preferred over v3 for new deterministic use cases.
- v7 (Unix timestamp + random): A newer version that combines a millisecond-precision Unix timestamp prefix with random bits. Time-sortable like v1 but without the MAC address leak. Increasingly adopted for database primary keys that need both uniqueness and chronological ordering.
How to use this tool
- Set
countto the number of UUIDs you need (1–100). - Click Generate.
- Copy individual UUIDs or use the Copy All button.
UUID v4 collision probability
UUID v4 has 2122 possible values — approximately 5.3 × 1036. To reach a 50% probability of a single collision you would need to generate about 2.7 × 1018 UUIDs. At a rate of one billion UUIDs per second, that would take over 85 years. For all practical purposes, UUID v4 collisions are impossible.
UUIDs as database primary keys
Using UUIDs as primary keys has tradeoffs. The benefits are significant: keys can be generated client-side without a database roundtrip, multiple services can generate records without conflicts, and records can be safely shared in URLs without exposing sequential IDs that reveal record counts. The cost is index performance — 16-byte random UUIDs fragment B-tree indexes more than sequential integers, causing more page splits and larger index sizes. If you need UUID primary keys with good insert performance, consider UUID v7 (time-ordered) or store UUIDs in a separate column while using an internal integer as the clustered key.