Reading a UUID
In xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx, the digit at M is the version and the first one or two bits of N the variant. For standard UUIDs, N is 8, 9, a or b. Version 4 is random; versions 3 and 5 are hashes of a name; versions 1, 6 and 7 contain a timestamp.
- v7 starts with a Unix timestamp in milliseconds, so it sorts by creation time: the recommended choice for new database keys.
- v1 stores a 60-bit count of 100-nanosecond intervals since 15 October 1582, split and reordered, plus a clock sequence and a node, originally the MAC address.
- v6 is v1 with the timestamp reordered so it sorts by time.
How to use the UUID Validator & Decoder
- Paste one or more UUIDs, one per line, or press Sample. Braces,
urn:uuid:and missing hyphens are accepted. - Read the version, variant and, for time-based UUIDs, the creation time.
- Copy another notation, or the regex that matches UUIDs of this version.
Examples
A version 7 UUID
017F22E2-79B0-7CC3-98C4-DC0C0C07398FVersion 7, created 2022-02-22T19:22:22.000ZThe example from RFC 9562. The first 12 hex digits, 017f22e279b0, are the milliseconds since 1970.
The same moment in a version 1 UUID
C232AB00-9414-11EC-B3C8-9F6BDECED846Version 1, created 2022-02-22T19:22:22.000ZThe timestamp's parts are stored in reverse order (11ec 9414 c232ab00), which is why v1 UUIDs don't sort by time.
A random version 4 UUID
{919108F7-52D1-4320-9BAC-F847DB4148A8}Version 4Braces and uppercase, as Microsoft tools write GUIDs, are accepted.
Privacy
A time-based UUID reveals when it was created, and a v1 UUID may reveal the MAC address of the machine that made it. Avoid them for identifiers that must not leak this, such as public links; use v4.
Limitations
- Version 2 (DCE security) UUIDs are recognised but their local domain and ID aren't decoded.
- The names behind version 3 and 5 UUIDs can't be recovered: they're hashes.
Frequently asked questions
Are my UUIDs uploaded?
No. Validation and decoding happen in your browser; nothing you paste is sent anywhere.
What regex validates a UUID?
^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ with the i flag accepts any standard UUID; replace [1-8] with a single digit to accept one version. Each result shows the regex for its version.
Can I get the creation date of a v4 UUID?
No. Version 4 UUIDs are random and contain no time. Only versions 1, 6 and 7 do.
How do I generate UUIDs?
Use the UUID Generator for v4 and v7 UUIDs.