UUID Decoder

Unpacking the Metadata in Your Identifiers

Enter a UUID to decode its timestamp and view its constituent random segments.




UUID Decoder: Decode UUID Versions, Timestamps and Fields

Most developers treat a UUID as an opaque identifier: a string that gets passed through an API, stored in a database, and eventually returned to a client.

That is a reasonable way to use a UUID, but some UUID versions contain structured information that can be decoded.

A UUID decoder takes a UUID and interprets its 128 bits according to the rules of its UUID version. Depending on the version, a decoder may be able to extract information such as a timestamp, version, variant, node identifier, or other version-specific fields.

This is particularly useful with time-based UUIDs such as UUID v1, UUID v6, and UUID v7.

It is important to understand the limitation, though: not every UUID contains a timestamp or other useful metadata. UUID v4, for example, is primarily random data, so there is no creation time to recover from the identifier.

What Does a UUID Decoder Do?

A UUID decoder takes a UUID in its standard textual representation and interprets the underlying 128-bit value.

For example:

0190c6c5-7b2a-7abc-8def-123456789abc

The decoder can first identify the UUID version and variant and then interpret the remaining fields according to that version's specification.

For UUID v7, the first 48 bits contain a Unix timestamp in milliseconds. A decoder can extract those bits and convert them into a human-readable date and time.

For UUID v1 and v6, the UUID contains time-related fields that can also be decoded according to their respective formats.

For UUID v4, there is no embedded creation timestamp. The UUID contains 122 bits of random data, along with its version and variant fields.

The important distinction is that a UUID decoder is not simply converting hexadecimal into binary. It is interpreting the binary data according to the UUID version.

What Information Can Be Decoded?

The information available depends on the UUID version.

UUID version Information that can be decoded
UUID v1 Timestamp and node-related information
UUID v3 Version, variant, and name-based identifier structure
UUID v4 Version, variant, and random identifier data
UUID v5 Version, variant, and name-based identifier structure
UUID v6 Timestamp and version-specific fields
UUID v7 Unix timestamp in milliseconds and version-specific fields

A decoder cannot recover information that was never encoded into the UUID.

For example, a UUID v4 does not contain a creation timestamp. If the application needs creation time, it must store that information separately, typically in a created_at column.

Who Uses a UUID Decoder?

A UUID decoder is primarily a development and diagnostic tool.

  • Backend engineers use it when investigating identifiers returned by APIs, databases, queues, or distributed services.
  • SREs and DevOps engineers can decode time-based UUIDs when investigating logs and distributed-system behavior.
  • Database administrators can inspect identifier distributions and verify that applications are generating the expected UUID versions.
  • Security and forensic analysts may inspect older time-based UUIDs for embedded node-related information or timestamps.
  • Developers maintaining legacy systems can decode existing identifiers when documentation about the original ID-generation strategy is incomplete.
  • QA engineers can use a decoder to verify that test systems are generating the expected UUID version and format.

A decoder is generally a diagnostic tool rather than something that needs to run on every production request.

How Is a UUID Decoder Used?

A typical decoding process looks like this:

  1. Input: The application or developer provides a UUID string.
  2. Normalization: The hyphens are interpreted as formatting rather than data, producing the underlying 128-bit value.
  3. Version detection: The decoder reads the UUID version field.
  4. Variant detection: The decoder determines which UUID variant the value uses.
  5. Version-specific decoding: The remaining fields are interpreted according to the UUID version.
  6. Presentation: Any useful information, such as a timestamp, is converted into a human-readable representation.

For example, a UUID v7 decoder can take its 48-bit timestamp and convert it from Unix milliseconds into a UTC date and time.

How Does UUID Decoding Work?

A canonical UUID contains 32 hexadecimal digits representing 128 bits, normally displayed with four hyphens:

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Each hexadecimal character represents four bits, also called a nibble.

The UUID version occupies four bits. In the canonical textual representation, it is the first hexadecimal character of the third group.

For example:

0190c6c5-7b2a-7abc-8def-123456789abc
              ^
              version = 7

The variant is encoded in the beginning of the fourth group.

Once the decoder knows the version and variant, it can interpret the remaining fields correctly.

This is important because the same bit position does not necessarily mean the same thing for every UUID version.

A timestamp in UUID v7, for example, is not equivalent to the fields occupying the same general area in UUID v4.

UUID v7 Decoding

UUID v7 is particularly useful to decode because its timestamp is deliberately placed at the beginning of the UUID.

The first 48 bits contain a Unix timestamp in milliseconds.

For example:

0190c6c5-7b2a-7abc-8def-123456789abc
^^^^^^^^^^^^
48-bit Unix timestamp

A decoder can convert that value into a date and time.

This does not necessarily tell you the exact moment an HTTP request was received or a database record was committed. It tells you the timestamp represented by the UUID's generation process.

That distinction matters in distributed systems, where an identifier might be generated before a request reaches a database or might be created by a client rather than a server.

UUID v1 and UUID v6 Decoding

UUID v1 and UUID v6 are both time-based UUID formats, although they arrange and interpret their fields differently.

A decoder can extract their timestamp information and convert it into a date and time.

UUID v1 can also contain a node identifier. Traditional UUID v1 implementations commonly used a network interface MAC address for this field, although UUID specifications and implementations allow other approaches.

Therefore, it is more accurate to say that a UUID v1 may expose node-related information rather than assuming that every UUID v1 contains a MAC address.

UUID v6 uses a reordered time-based layout designed to make the UUID's binary and textual ordering more useful for chronological sorting.

What Happens When You Decode UUID v4?

UUID v4 is different.

A UUID v4 contains:

  • 4 version bits
  • 2 variant bits
  • 122 random bits

There is no embedded timestamp, machine identifier, or sequence number to recover.

A decoder can still tell you:

  • That it is UUID v4
  • Which variant it uses
  • Its underlying hexadecimal/binary representation
  • The random portion of the identifier

But it cannot determine when the UUID was generated from the UUID itself.

For example:

550e8400-e29b-41d4-a716-446655440000

does not contain a hidden creation date waiting to be decoded.

If you need creation time, store it separately.

Relevant UUID Internals

There is no single field layout that applies identically to every UUID version.

A better way to understand UUID decoding is to separate the fields that identify the UUID format from the version-specific data.

Field Size Purpose
Version 4 bits Identifies the UUID version
Variant 2 or more bits Identifies the UUID layout/variant
Remaining fields Version-dependent Timestamp, randomness, node information, counters, or other data

For example, UUID v7 has a specific structure that includes a 48-bit Unix timestamp followed by additional version-specific fields.

UUID v4 instead uses its available non-reserved bits for random data.

UUID v1 and v6 have their own time-based layouts.

This version-specific interpretation is the key to correctly decoding a UUID.

Can a UUID Decoder Tell When a Record Was Created?

Sometimes.

If the identifier is a time-based UUID such as v1, v6, or v7, the UUID can contain time information that can be decoded.

If the identifier is UUID v4, it cannot.

This distinction is important when designing databases.

For example, this schema:

id          UUID
created_at  timestamp

can be useful even when id is UUID v7.

Although UUID v7 contains a timestamp, an explicit created_at column makes the application's intended creation time available directly to queries, reporting tools, and business logic.

It also avoids forcing every consumer of the data to understand the UUID encoding.

Can a UUID Decoder Reveal Sensitive Information?

Potentially, depending on the UUID version.

UUID v7 exposes the approximate generation time through its timestamp.

UUID v1 can contain node-related information in addition to its timestamp.

UUID v4 does not intentionally encode either of these types of information.

This means the choice of UUID version can affect what information is visible when an identifier is exposed publicly.

A UUID should therefore be treated as an identifier rather than a secret.

If an application requires a value to remain confidential or unpredictable for security purposes, it should use an appropriate cryptographic token and enforce authorization independently.

UUID Decoding vs UUID Validation

A decoder and validator perform different jobs.

A UUID validator answers questions such as:

Is this a correctly formatted UUID?

Does it use an allowed UUID version?

Does it use the expected variant?

A UUID decoder answers questions such as:

Which UUID version is this?

Does this UUID contain a timestamp?

What timestamp does this UUID represent?

What version-specific fields can be extracted?

The two tools are complementary.

A validator determines whether an identifier conforms to the expected rules. A decoder interprets the information contained within a valid UUID.

UUID Decoding Is Version-Specific

The most important rule when decoding UUIDs is simple:

First determine the UUID version, then interpret the version-specific fields.

It is incorrect to take the first 48 bits of every UUID and call them a timestamp.

That works for UUID v7 because RFC 9562 specifically defines those bits as a Unix timestamp in milliseconds. It does not work for UUID v4 because those bits are part of its random data.

Likewise, UUID v1 and v6 use different time-based layouts.

A decoder therefore needs to understand the UUID version rather than treating all 128-bit UUIDs as having the same internal structure.

Final Engineering Takeaway

A UUID is more than a 36-character string, but exactly what can be learned from it depends on the UUID version.

UUID v4 is intentionally opaque and random. It does not contain a creation timestamp.

UUID v1 and v6 contain time-based information and can provide additional version-specific data.

UUID v7 contains a 48-bit Unix timestamp in milliseconds, making its approximate generation time directly recoverable from the identifier.

A UUID decoder is therefore most useful when you need to inspect an identifier during development, troubleshooting, migration, testing, or data analysis.

The key rule is to decode the UUID according to its version. There is no universal UUID field layout beyond the common version and variant concepts, and a decoder should never assume that bits have the same meaning across different UUID versions.


Related Tools and Guides

Need some UUIDs for testing? Try our tools for generating UUID v4   UUID v7   ULID   NanoID and decoding validating.
For a detailed comparison of UUID versions, visit our Complete Guide to UUID Versions.