Unix Timestamp Converter

Turn a Unix timestamp from a log, database or API into a readable date, or get the timestamp for a date and time in any time zone.

Runs entirely in your browser. Nothing you enter is uploaded or stored.

Current Unix time

0

Timestamp → date

Date → timestamp

How to convert a timestamp

  1. Paste the number into Timestamp → date. The unit is detected from the number of digits: 10 digits are seconds, 13 are milliseconds, 16 are microseconds and 19 are nanoseconds. Override it if your value is unusual.
  2. Read the date in UTC, in ISO 8601 format, in your selected time zone, and relative to now (“3 days ago”).
  3. To go the other way, pick a date and time on the right and choose the time zone it's in. The Unix timestamp in seconds and milliseconds appears below.

The clock at the top shows the current Unix time in seconds, updated every second.

What a Unix timestamp is

A Unix timestamp (epoch time, POSIX time) counts the seconds since 1 January 1970, 00:00:00 UTC, not counting leap seconds. It's the same number everywhere in the world at a given moment, which is why databases, log files and APIs use it: no time zones, no daylight-saving ambiguities.

LanguageCurrent timestamp
JavaScriptMath.floor(Date.now() / 1000) (Date.now() is in milliseconds)
Pythonint(time.time())
PHPtime()
JavaInstant.now().getEpochSecond()
MySQLUNIX_TIMESTAMP()
PostgreSQLextract(epoch from now())
Shelldate +%s

Common pitfalls

Frequently asked questions

How do I know if my timestamp is in seconds or milliseconds?

Count the digits. Current dates are 10 digits in seconds (e.g. 1700000000) and 13 digits in milliseconds (e.g. 1700000000000). Auto-detect uses this rule.

Do Unix timestamps include leap seconds?

No. Unix time assumes every day has exactly 86,400 seconds, so leap seconds are not counted. For almost all applications this doesn’t matter.

What time zone is a Unix timestamp in?

None — it’s an absolute moment counted from midnight UTC on 1 January 1970. The same timestamp shows as different local times in different time zones.

Is this converter accurate for dates far in the future or past?

It handles any date JavaScript supports, roughly 271,000 years either side of 1970. Time zone rules for dates far from today are best-effort, because governments change them.