How to decode a UUID
- Paste a UUID or GUID in any common form: with or without hyphens, in braces, upper or lower case, or with
urn:uuid:. A 26-character ULID works too. - The bit layout colours each hex digit by the field it belongs to. Hover a group to see its name.
- The table lists the version, variant and every field. For time-based IDs it shows the creation time in UTC, your local time, Unix milliseconds and how long ago that was.
- Use the copy buttons to grab any value, such as the ISO timestamp or the ULID form.
What each UUID version contains
| Version | Fields you can decode | Creation time? |
|---|---|---|
| v1 | 60-bit Gregorian timestamp, 14-bit clock sequence, 48-bit node (often a MAC address) | Yes, to 100 ns |
| v2 | Like v1, but the low timestamp bits hold a local user or group ID | Roughly, to about 7 minutes |
| v3 / v5 | MD5 or SHA-1 hash of a namespace and name | No |
| v4 | 122 random bits | No |
| v6 | The v1 fields with the timestamp reordered, most significant first | Yes, to 100 ns |
| v7 | 48-bit Unix millisecond timestamp, 12-bit rand_a, 62-bit rand_b | Yes, to 1 ms |
| v8 | Three custom fields whose meaning the creator defines | Depends on the creator |
Every version reserves the same 6 bits: the version is the 13th hex digit and the variant is the top 2 bits of the 17th. A variant digit of 8, 9, a or b means the RFC 9562 layout, which is the only one whose other fields can be decoded.
How the timestamp is calculated
For v7, read the first 12 hex digits as one number. That's milliseconds since 1 January 1970 UTC:
017f22e279b0 is 1,645,557,742,000, which is 22 February 2022 19:22:22 UTC.
For v1, put the groups back in order: the last three digits of group 3, then group 2, then group 1. The result counts 100-nanosecond steps since 15 October 1582, when the Gregorian calendar began. Divide by 10,000 for milliseconds and subtract 12,219,292,800,000 to move to the Unix epoch. v6 stores the same number already in order, so it sorts correctly as text.
A decoded time is only as accurate as the clock of the machine that made the ID. Use it to debug ordering or find roughly when a record appeared, not as an audit trail. Need to check a whole list for validity? Use the GUID validator.