Unix timestamp converter

Paste an epoch timestamp to see it as a date in UTC and your local time, or pick a date to get its timestamp. Seconds and milliseconds are detected for you.

runs in your browser · nothing uploaded

loading tool…

How to use it

  1. The current Unix time ticks at the top. Click it to copy.
  2. Paste a timestamp into the first box. A 13-digit number is read as milliseconds, 10 digits as seconds.
  3. Or pick a date and time in the second box to get its timestamp in both units.

What a Unix timestamp is

Unix time counts seconds since 00:00:00 UTC on 1 January 1970, ignoring leap seconds. It has no time zone: the same instant has the same timestamp everywhere, which is why it is the safest way to store a moment in a database or an API.

JavaScript's Date.now() and Java's System.currentTimeMillis() return milliseconds. Most databases, JWTs and Unix tools use seconds. Mixing them up gives dates in 1970 or in the year 50,000.

The year 2038 problem

A signed 32-bit integer runs out at 2,147,483,647 seconds, which is 03:14:07 UTC on 19 January 2038. Systems that still store time in 32 bits will wrap round to 1901 then. Modern languages and 64-bit systems use 64-bit time, but old embedded devices and some database columns do not.

Questions

Is what I paste sent to a server?

No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is uploaded, logged or stored by us, so it is safe to use with real data.

How do I get the current timestamp in code?

JavaScript: Math.floor(Date.now() / 1000). Python: int(time.time()). Bash: date +%s. PHP: time(). Go: time.Now().Unix().

Which time zone is shown?

Both UTC and the time zone your browser reports. To compare times across zones, use the time zone converter on Horizech Convert.

Can a timestamp be negative?

Yes. Negative values are moments before 1970, and this tool converts them too.

// built by horizech
Need a meeting time across zones? Convert has a time zone converter.
Time zone converter on Horizech Convert ↗