Timestamp to CUID Converter

Generate a CUID v1 identifier for any specific point in time. Useful for data migration and historical record cleanup.

Want to extract a timestamp from an existing CUID?CUID to Timestamp →

About CUID Timestamp Encoding

CUID v1 identifiers are designed to be roughly time-sortable. This is achieved by placing a base36-encoded millisecond timestamp at the beginning of the ID (immediately after the 'c' prefix).

By providing a Unix timestamp (in milliseconds) to this tool, we can construct the exact 8-character sequence that would have been generated at that precise moment.

Example

Timestamp: 1666258414960
Base36: l9ebqkxk
Generated CUID:cl9ebqkxk0000mc04r8fzagsy

Frequently Asked Questions

How is a timestamp encoded within a CUID?

In CUID v1, the second through ninth characters are a base36 encoding of the Unix timestamp in milliseconds. This tool generates a CUID containing that specific sequence of 8 characters.

Is it possible to generate a CUID2 for a specific timestamp?

No, CUID2 is designed to be completely random and does not encode timestamps. This is a security feature intended to prevent predictability. If you need timestamp encoding, use CUID v1 instead.

Is the rest of the CUID random?

Yes, the rest of the generated CUID (counter, fingerprint, and random components) is generated normally to ensure that it looks and acts like a valid, unique CUID.

Why would I need a CUID based on a timestamp?

This is useful for debugging, migrating legacy data, and generating IDs that need to be sorted correctly in time-based systems, especially when the original creation date is already known.