UUID and ULID Timestamp Decoder

Read the creation time stored inside a UUID or a ULID.

Timestamp tool

An identifier

A UUID in any common form, or a 26-character ULID.

Nothing you paste leaves your browser.

TIME STAMP
—
—

How to use this decoder

  1. 1

    Paste the identifier. A UUID with or without dashes, braces or “urn:uuid:”, or a ULID.

  2. 2

    Read the version. The version digit decides whether there is a time stamp: versions 1, 6 and 7 have one, versions 3, 4, 5 and 8 do not.

  3. 3

    Copy the time. In UTC, in your time zone and as Unix milliseconds.

Example

The UUID 017F22E2-79B0-7CC3-98C4-DC0C0C07398F is version 7 and was created at 2022-02-22 19:22:22 UTC.

The ULID 01ARYZ6S41TSV4RRFFQ69G5FAV holds the time 1469918176385 ms: 2016-07-30 22:36:16.385 UTC.

How it is calculated

Version 1 and 6 UUIDs store a 60-bit count of 100-nanosecond intervals since October 15, 1582 (the start of the Gregorian calendar); version 6 stores it in sortable order. Version 7 UUIDs and ULIDs store Unix time in milliseconds in their first 48 bits. Decoding follows RFC 9562 and the ULID specification.

The time is whatever the generating system’s clock said, so it can be wrong if that clock was wrong. Version 4 UUIDs, the most common kind, are random and contain no time at all.

Which identifiers contain a time?

Identifier types
TypeContains a time?What it stores
UUID v1Yes60-bit count of 100 ns intervals since 1582-10-15, plus a node id
UUID v3, v5NoA hash of a name and a namespace
UUID v4NoRandom bits only
UUID v6YesThe same time as v1, reordered so it sorts by time
UUID v7Yes48-bit Unix time in milliseconds, then random bits
ULIDYes48-bit Unix time in milliseconds + 80 random bits, 26 characters
UUID v8MaybeCustom layout defined by the application

Inside a version 7 UUID

Layout of a version 7 UUIDA 128-bit version 7 UUID: 48 bits of Unix time in milliseconds, 4 version bits, 12 random bits, 2 variant bits and 62 random bits.48 bitsUnix time (ms)4version12 bitsrandom2var.62 bitsrandom
Example 018bcfe5-6800-7abc-8def-0123456789ab: the first 48 bits (018bcfe5-6800) are 1700000000000 ms since 1970, which is 2023-11-14T22:13:20.000Z.

Because the time comes first, version 7 identifiers sort by creation time, which keeps database indexes compact. The random part makes collisions practically impossible. The time is whatever clock generated the identifier, so a wrong clock gives a wrong date.

Time in a UUID is not a secret

Anyone can read the creation time from a v1, v6 or v7 UUID or from a ULID. Do not use them where the creation time must stay private. Version 1 also includes a node identifier, which may reveal the machine that created it.

Free downloads

Plain files you can keep, print or open in a spreadsheet. They are the same figures used on this page.

Questions

Can I get the time from a version 4 UUID?

No. Apart from the version and variant digits, a version 4 UUID is random. If you need the creation time, store it separately or use version 7.

Is a UUID the same as a GUID?

GUID is the Microsoft name for the same 128-bit format.