Epoch Converter

Paste a Unix timestamp to see it as a UTC, local and ISO 8601 date, or pick a date to get its epoch seconds and milliseconds.

Current Unix time (seconds)

…

 

10 digits are read as seconds, 13 digits as milliseconds. ISO dates such as 2023-11-14T22:13:20Z also work.

Date to timestamp

Batch converter

One timestamp per line, in seconds or milliseconds. Up to 1,000 lines.

Year 2038

Systems that store Unix time in a signed 32-bit integer can count only up to 2147483647, which is 19 Jan 2038, 03:14:07 UTC. One second later the value overflows to a negative number and those systems jump back to December 1901. 64-bit systems, JavaScript and this converter are not affected.

Why convert epoch time?

Databases, log files, JWT claims and most APIs store moments in time as a bare number: the count of seconds (or milliseconds) since midnight UTC on 1 January 1970. That number is easy for a program to sort and compare, but it tells a person nothing. When you are reading a log line or checking when a token expires, you need the calendar date in front of you, in UTC and in your own time zone.

This converter does that in both directions. The conversion happens in your browser with JavaScript's built-in Date object, so the timestamps you paste are never sent anywhere.

Example: 1700000000

The value 1700000000 has 10 digits, so it is read as seconds:

Input:     1700000000           (seconds)
UTC:       14 Nov 2023, 22:13:20 UTC
ISO 8601:  2023-11-14T22:13:20.000Z
In ms:     1700000000000

Typing the 13-digit value 1700000000000 gives the same moment, because it is the same count expressed in milliseconds. Someone in Pakistan (UTC+5) would see it as 15 November 2023, 03:13:20 local time.

How to convert a Unix timestamp

  1. Paste the timestamp, or an ISO 8601 date such as 2023-11-14T22:13:20Z, into the input, or click Use now.
  2. Click Timestamp to readable date (or press Enter). 10 digits are read as seconds, 13 as milliseconds.
  3. Read the UTC, local, ISO 8601 and relative results, and click Copy next to the one you need.
  4. To go the other way, pick a date and time under Date to timestamp and copy the value it shows.
  5. For many values at once, paste them one per line into the Batch converter.

Frequently asked questions

What is the difference between seconds and milliseconds?
Unix tools, PHP, Python's time.time() and most databases count whole seconds, which is 10 digits for dates between 2001 and 2286. JavaScript's Date.now(), Java's System.currentTimeMillis() and many JSON APIs count milliseconds, which adds three more digits. This converter decides by length: 10 digits means seconds, 13 means milliseconds.
What is the Unix epoch?
It is the fixed starting point, 00:00:00 UTC on 1 January 1970. A Unix timestamp is the number of seconds since that moment, so 0 is the epoch itself and negative numbers are dates before 1970. Leap seconds are not counted; every day is treated as exactly 86,400 seconds.
Does the timestamp I enter leave my browser?
No. The page converts values with JavaScript on your own device. Nothing you type is uploaded, logged or sent to an analytics service.
What happens if I enter an invalid number?
You get a message explaining the problem instead of a wrong date. Text that is neither digits nor an ISO 8601 date is rejected, a number with more than 13 digits is rejected because it is neither seconds nor milliseconds, and impossible dates such as 2023-02-30 are refused rather than rolled over into March.

Related tools