Epoch Converter

Unix timestamp to date and back, seconds or milliseconds, with a live clock.

A bare number like 1718600000 in a log means nothing until you convert it, and that's the whole job here. Paste it and we work out whether it's seconds or milliseconds (the usual trap, off by a factor of a thousand), then show the local time, the UTC time, the ISO string and how long ago that was. The live clock up top keeps the current timestamp handy, and the date picker runs it the other way when you need a timestamp from a calendar date. We built it for the moment an API hands you an integer and you just need to know what instant it points at. It all runs in your browser, nothing leaves the page.

100% in your browser. Nothing you type ever leaves this page.

Now ...s ...ms

Local time
...
UTC
...
ISO 8601
...
Relative
...
Timestamp: ...

A timestamp is just a number of seconds

Unix time counts the seconds since midnight UTC on 1 January 1970. One integer, no time zone attached, the same value everywhere on Earth at a given instant. That's why it's all through logs, databases and APIs. It's also why it throws people the first time, because the number on its own, something like 1718600000, tells you nothing until you convert it.

The one trap: seconds vs milliseconds

JavaScript, Java and a lot of APIs use milliseconds; Unix tools, databases and most backends use seconds. Same instant, different scale, off by a factor of a thousand. Paste the wrong one and your date lands in 1970 or in the year 56000. This tool guesses by digit count and shows you which it picked, so the mistake is visible instead of silent.

Store UTC, show local

The local line here uses your browser time zone, which is handy for a quick read but is not what you should persist. Store the raw timestamp (or an ISO string in UTC) and convert to local only when you display it. Mixing local times into stored data is how you end up with bugs that only appear twice a year, on the daylight-saving switch.

Frequently asked questions

Seconds or milliseconds, how does it tell?

By length. A Unix timestamp in seconds is 10 digits right now (it crossed to 10 back in 2001); in milliseconds it is 13. The tool auto-detects and tells you which it assumed, and you can flip it manually if your value is unusual.

Why does the local time differ from the UTC time?

A Unix timestamp has no time zone, it is just a count of seconds since 1970 UTC. The local line applies your browser time zone; the UTC line is the raw instant. When you log timestamps, log the UTC value and convert at the edges, never store local time.

What is the 2038 problem?

Systems that store the timestamp in a signed 32-bit integer overflow on 19 January 2038, wrapping to 1901. Anything modern uses 64-bit and is fine for the next 292 billion years, but old embedded gear and some C code still bite. If you maintain legacy systems, it is worth checking.

Does it work offline?

Yes. It is plain JavaScript in your page, no network, nothing sent anywhere. The live clock keeps ticking with no connection.