Unix timestamp converter (epoch to date)

A Unix timestamp counts the seconds since 1 January 1970 at 00:00:00 UTC. Paste one, in seconds or milliseconds (the converter tells you which), to see the date in UTC, India Standard Time and your own time zone, or enter a date to get its timestamp.

Seconds, milliseconds, microseconds or nanoseconds. A minus sign means a date before 1970.

Date and time in UTC

2023-11-14T22:13:20Z

Tuesday, 14 November 2023, 22:13:20 UTC · read as seconds

Read as
Seconds, detected from its 10 digits
UTC, ISO 8601
2023-11-14T22:13:20Z
UTC, readable
Tuesday, 14 November 2023, 22:13:20
India Standard Time (Asia/Kolkata)
Wednesday, 15 November 2023, 03:43:20 (UTC+05:30)2023-11-15T03:43:20+05:30
Unix time in seconds
1700000000
Unix time in milliseconds
1700000000000
  • Read as seconds because it has 10 digits: up to 11 digits are read as seconds, 12–14 as milliseconds, 15–17 as microseconds and 18–20 as nanoseconds. Set the unit yourself if that is wrong.

How do you convert a Unix timestamp to a date?

A Unix timestamp is the number of seconds since 00:00:00 UTC on 1 January 1970, the Unix epoch. To get the date, count that many seconds forward from the epoch, or backward for a negative timestamp, so −86400 is 00:00:00 UTC on 31 December 1969. POSIX defines every day as exactly 86,400 seconds, so leap seconds are not counted.

One timestamp is one instant everywhere; only the clock reading changes with the time zone. 1700000000 is 22:13:20 on 14 November 2023 in UTC and 03:43:20 on 15 November in India, which has kept UTC+05:30 all year, with no daylight saving, since October 1945. The converter takes every zone's rules from the IANA time zone database through the JavaScript Intl API, so daylight saving and past offset changes apply to the date you enter.

Seconds and milliseconds differ in length. From September 2001 to November 2286 a timestamp in seconds has 10 digits and one in milliseconds, which JavaScript's Date.now() returns, has 13. The converter reads up to 11 digits as seconds, 12 to 14 as milliseconds, 15 to 17 as microseconds and 18 to 20 as nanoseconds; set the unit yourself for a timestamp outside those years.

date (UTC) = 1970-01-01T00:00:00Z + timestamp seconds
seconds = milliseconds ÷ 1000, rounded down
India Standard Time = UTC + 5 h 30 min

Which Unix timestamps are worth knowing?

Notable Unix timestamps and their dates in UTC, computed by this converter
Timestamp (seconds)Date and time (UTC)Why it is notable
-21474836481901-12-13T20:45:52ZEarliest second a signed 32-bit counter can hold
-11969-12-31T23:59:59ZOne second before the epoch: negative timestamps are dates before 1970
01970-01-01T00:00:00ZThe Unix epoch, where the count starts
10000000002001-09-09T01:46:40ZOne billion seconds: the first 10-digit timestamp
12345678902009-02-13T23:31:30ZThe digits 1 to 9 and 0 in order
17000000002023-11-14T22:13:20Z1.7 billion seconds, this page's example
20000000002033-05-18T03:33:20ZTwo billion seconds
21474836472038-01-19T03:14:07ZLast second a signed 32-bit counter can hold: the year 2038 problem
42949672952106-02-07T06:28:15ZLast second an unsigned 32-bit counter can hold
99999999992286-11-20T17:46:39ZLargest 10-digit timestamp in seconds
8640000000000+275760-09-13T00:00:00ZLatest moment a JavaScript Date can hold (8.64 × 10¹⁵ ms)

How to convert a Unix timestamp to a date

  1. 1
    Choose the directionPick Timestamp → date to read a timestamp, or Date → timestamp to make one from a date.
  2. 2
    Enter the timestamp or the datePaste a timestamp in any unit, or press Now for the current one. For a date, enter it and choose whether it is in UTC, India Standard Time or your own time zone.
  3. 3
    Check the unitThe result says whether the timestamp was read as seconds, milliseconds, microseconds or nanoseconds. If that is wrong, pick the unit yourself.
  4. 4
    Copy what you needCopy the ISO 8601 date, or the timestamp in seconds or milliseconds, with the copy buttons in the result.

Frequently asked questions

Is a Unix timestamp the same in every time zone?
Yes. It counts seconds from one instant, 00:00:00 UTC on 1 January 1970, so 1700000000 is the same moment in London, Bangalore and New York. Only the local clock reading differs, which is why this page shows UTC, India Standard Time and your own zone side by side.
How can I tell if a timestamp is in seconds or milliseconds?
Count the digits. For dates between September 2001 and November 2286 a timestamp in seconds has 10 digits and one in milliseconds has 13. JavaScript's Date.now() returns milliseconds, while the Linux date +%s command and Python's time.time() give seconds.
What is the year 2038 problem?
Software that keeps Unix time in a signed 32-bit integer can count only up to 2,147,483,647, which is 03:14:07 UTC on 19 January 2038. One second later the value wraps round to −2,147,483,648, which reads as 20:45:52 UTC on 13 December 1901. Storing the time in 64 bits avoids it.
Does Unix time count leap seconds?
No. POSIX defines every day as exactly 86,400 seconds, so a leap second such as 23:59:60 has no Unix timestamp of its own and the count since 1970 is lower than the true number of elapsed seconds.
How do I get the current Unix timestamp in code?
In JavaScript use Math.floor(Date.now() / 1000), because Date.now() returns milliseconds. In Python use int(time.time()), and in a Linux shell run date +%s; date -u --date='@1700000000' turns a timestamp back into a UTC date.

Sources

Related tools

See all 73 free tools

Need a custom dev tool for your team?

We build internal tools, dashboards, APIs, and SaaS platforms. If you can describe it, we can ship it.

Built by CountryDevs · No signup · No ads · We count visits, never what you enter