Unix Timestamp Converter

Convert Unix timestamps (seconds, milliseconds or microseconds) to human-readable dates in UTC and your local time zone, and dates back to timestamps.

0Current Unix time (seconds)
0Milliseconds

Date to timestamp

The date is read in your local time zone.

How to convert a timestamp

Paste a number into the box. The tool works out whether it's in seconds, milliseconds or microseconds from the number of digits and shows the moment in UTC, your local time zone, ISO 8601 and as a relative time like "3 days ago". You can also paste a date string such as 2026-10-15T09:30:00Z to get its timestamp. To go the other way, pick a date and time in the second section.

What a Unix timestamp is

Unix time counts the seconds since 00:00:00 UTC on 1 January 1970, a moment known as "the epoch". It ignores time zones entirely, which is its biggest strength: 1760000000 means exactly the same instant in Tokyo, London and San Francisco. That's why databases, log files, APIs and tokens use it so heavily. Time zones only come into play when you display the value to a person.

Seconds or milliseconds?

This is the single most common timestamp bug. Unix tools, PHP, Python's time.time() and JWT claims use seconds. JavaScript's Date.now(), Java's System.currentTimeMillis() and many JSON APIs use milliseconds.

  • A current timestamp in seconds has 10 digits.
  • In milliseconds it has 13 digits.
  • In microseconds (common in PostgreSQL and some logging systems) it has 16.

If a date shows up in January 1970, you probably treated milliseconds as seconds in the wrong direction; if it shows up tens of thousands of years in the future, it's the opposite. We wrote about this and other time-related traps in Unix timestamps and time zones.

Quick reference

LanguageCurrent timestamp
JavaScriptMath.floor(Date.now() / 1000)
Pythonint(time.time())
PHPtime()
Gotime.Now().Unix()
Bashdate +%s
PostgreSQLextract(epoch from now())

The year 2038

Systems that store Unix time in a signed 32-bit integer will overflow at 03:14:07 UTC on 19 January 2038, wrapping around to 1901. Modern operating systems and languages use 64-bit values, but old embedded devices and some database columns (MySQL's TIMESTAMP type, for instance) are still affected. It's worth checking if you store dates far in the future, like 15-year expiry dates.

Frequently asked questions

Does Unix time include leap seconds?

No. Unix time assumes every day has exactly 86,400 seconds. Leap seconds are smoothed over by the operating system, so you can safely ignore them in most applications.

Why does the local time look wrong?

Local time uses your device’s time zone setting. Compare the UTC row instead if you are debugging a server.

Can timestamps be negative?

Yes. Negative values represent dates before 1970, for example -86400 is 31 December 1969.