Every version, and which one to use
Versions 1, 3, 4, 5, 6, 7 and 8, plus nil and max, each with a short note on what it is for. Version 4 is the default; version 7 is recommended for database keys because it sorts into creation order instead of scattering your index.
Version 7 that actually stays in order
A batch of a hundred v7 UUIDs all lands in the same millisecond, where most generators stop being ordered. This one keeps a sub-millisecond counter as RFC 9562 section 6.2 describes, so a batch sorts correctly as text, as bytes and in a database index.
Seven output forms
- Canonical 8-4-4-4-12, or 32 bare hex digits
- Braces for the Windows registry and .NET, or
urn:uuid: - 22 characters of Base64URL, one decimal integer, or sixteen 0x octets for source code
Upper or lower case throughout; copy one row, copy the batch or share it. Versions 3 and 5 build name-based UUIDs from the four RFC namespaces or your own.
Take any UUID apart
See the version and variant, the embedded timestamp in UTC and local time, the clock sequence, node and counter, and where all sixteen octets sit. A v1 or v6 UUID can contain a real MAC address that identifies the machine that made it; the app says so plainly. The app itself never reads your MAC address.
Questions
- Should I use UUID v4 or v7?
- v4 is fully random and the right default for most identifiers. Use v7 for database primary keys: it is time-ordered, so new rows land together in the index.
- Can a UUID reveal personal information?
- Version 1 and 6 UUIDs can embed the creating machine's MAC address and the creation time. The inspector shows both and warns when a real MAC address is present.
- Is a UUID guaranteed to be unique?
- Not guaranteed, but random v4 and v7 values have so many possible combinations that a collision is vanishingly unlikely in practice.
Free on Google Play, supported by ads. Read the UUID Generator privacy policy. Questions or a bug? Write to support@tahatec.com.