Timestamp Converter

Convert between Unix timestamps (seconds or milliseconds) and human-readable dates. Runs entirely in your browser.

Dates are converted using your device's local timezone unless noted UTC.

Convert Unix timestamps to readable dates and back, with the seconds-versus-milliseconds distinction that causes most of the bugs in this area.

Seconds or milliseconds

Unix time counts seconds since 1 January 1970 UTC. A current value has ten digits. JavaScript's Date object, however, counts milliseconds, so the same moment is a thirteen-digit number. Passing a ten-digit value to new Date() gives a date in 1970.

This mismatch is the single most common timestamp bug. Databases and APIs usually speak seconds; JavaScript usually speaks milliseconds. Checking the digit count before converting prevents almost all of it.

UTC is the storage format, local time is the display

A timestamp is an absolute instant with no timezone attached. Timezones only enter when you render it. Storing local time as a string loses the offset and makes the value ambiguous during daylight-saving transitions, which is why servers store integers and format at the edge.

The tool shows both the UTC rendering and your local rendering so you can see the offset explicitly rather than guessing.

The 2038 problem

Systems storing Unix time in a signed 32-bit integer overflow on 19 January 2038, wrapping to a negative value and rendering as 1901. Most modern systems use 64-bit integers and are unaffected, but embedded devices, older databases and long-lived file formats are not.

If you are choosing a storage type today, use a 64-bit integer or a native timestamp type and the problem disappears.

Frequently asked questions

How do I get the current timestamp?
The tool shows a live clock at the top. In a shell, date +%s gives seconds and date +%s%3N gives milliseconds.
Why does my date show one day off?
Almost always a timezone offset. A timestamp near midnight UTC lands on a different calendar day in UTC+8 or UTC-5. Check which rendering you are reading.
Does it handle negative timestamps?
Yes. Negative values represent instants before 1970 and convert normally.