navaja.dev / timestamp

Unix timestamp converter

Paste an epoch timestamp to see the date in UTC, your time zone and any other, or pick a date to get its timestamp. Seconds, milliseconds, microseconds and nanoseconds are detected for you.

Current Unix time

0

0 ms

Timestamp to date

Date to timestamp

Unix seconds
–
Milliseconds
–

Your time zone: .

How to convert a Unix timestamp

  1. Paste the timestamp in Timestamp to date. 10 digits are read as seconds, 13 as milliseconds, 16 as microseconds and 19 as nanoseconds, and the tool says which one it picked.
  2. Read the date in UTC, in your own time zone and in any other zone you choose, plus ISO 8601, the HTTP date format and how long ago it was.
  3. Going the other way? Pick a date, time and time zone in Date to timestamp to get the Unix time in seconds and milliseconds. Daylight saving time is handled for you.

What is a Unix timestamp?

Unix time (also called epoch time or POSIX time) counts the seconds since 1 January 1970 00:00:00 UTC, ignoring leap seconds. It is the same number everywhere on Earth at the same instant, so it's the standard way to store and send times in databases, logs, APIs and JWTs. JavaScript and Java often use milliseconds instead of seconds, and some systems (Go, PostgreSQL, Kafka, OpenTelemetry) use microseconds or nanoseconds.

Get the current timestamp in code

The year 2038 problem

Systems that store Unix time in a signed 32-bit integer overflow on 19 January 2038 at 03:14:07 UTC (timestamp 2147483647) and wrap to 1901. Use 64-bit integers for timestamps; most modern languages and databases already do.

Questions

Is a Unix timestamp in seconds or milliseconds?

Classic Unix time is seconds, a 10-digit number today. JavaScript's Date.now(), Java's System.currentTimeMillis() and many APIs use milliseconds, a 13-digit number. This tool detects which one you pasted.

Does a Unix timestamp depend on the time zone?

No. A Unix timestamp is the same everywhere at the same moment; it always counts from 1970-01-01 in UTC. Time zones only matter when you show it as a date, which is why the tool shows UTC, your local time and any zone you pick.

What is epoch time?

Another name for Unix time: the number of seconds since the Unix epoch, 1 January 1970 00:00:00 UTC.

How do I convert a timestamp to a date in Excel or Google Sheets?

For seconds: =A1/86400+DATE(1970,1,1), then format the cell as a date and time (the result is in UTC). The tool also shows the spreadsheet serial number for a timestamp.

Why is my date off by a few hours?

Usually a time zone mix-up: the timestamp is UTC but was shown as local time, or a date without a zone was read as local time. Check the UTC line and the zone you expect.

Why is my date in 1970 or far in the future?

The unit is wrong: milliseconds read as seconds land tens of thousands of years in the future, and seconds read as milliseconds land in January 1970. This tool guesses the unit from the size of the number.

Does Unix time include leap seconds?

No. Unix time pretends every day has exactly 86,400 seconds, so leap seconds are not counted.

Is anything sent to a server?

No. All conversions run in your browser using its built-in time zone database.