Unix Timestamp Converter

Turn epoch time into a readable date, or a date into a Unix timestamp. Seconds and milliseconds are detected for you.

Your time zone: UTC offset now:
Timestamp unit:

Timestamp to date

ISO 8601 (UTC)
2023-11-14T22:13:20.000Z
RFC 2822
Tue, 14 Nov 2023 22:13:20 +0000
Your local time
UTC string
Tue, 14 Nov 2023 22:13:20 GMT
Seconds and milliseconds
1700000000 s = 1700000000000 ms
Relative to now

Date to timestamp

Interpret as:
Unix timestamp (seconds)
1700000000
Unix timestamp (milliseconds)
1700000000000
ISO 8601 (UTC)
2023-11-14T22:13:20.000Z
Same moment in your local time

Converting a whole list? Use the epoch batch converter to paste many timestamps and copy the results as CSV.

How to use the Unix timestamp converter

  1. To read a timestamp, paste it into Unix timestamp. Leave Timestamp unit on Auto-detect, or force Seconds or Milliseconds.
  2. Copy any result: ISO 8601, RFC 2822, your local time, the UTC string, or the seconds and milliseconds values. Press Now to fill in the current time.
  3. To get a timestamp from a date, choose it in Date and time, then pick Interpret as UTC or Your local time.

How the conversion works

A Unix timestamp counts the seconds since 1970-01-01 00:00:00 UTC, the Unix epoch. Every day counts as exactly 86,400 seconds, so leap seconds are ignored, as defined in the POSIX "Seconds Since the Epoch" definition. The tool turns your number into milliseconds and hands it to the JavaScript Date object, which covers about 271,821 BC to 275760 AD (MDN: Date).

Auto-detect looks at the size of the number. Below 1e11 it reads seconds (10 digits for today's dates). From 1e11 up to 1e14 it reads milliseconds (13 digits), up to 1e17 microseconds (16 digits), and above that nanoseconds (19 digits).

Worked example

The page opens with 1700000000 in Unix timestamp and Auto-detect on. It reads that as seconds and shows 2023-11-14T22:13:20.000Z for ISO 8601, Tue, 14 Nov 2023 22:13:20 +0000 for RFC 2822 and Tue, 14 Nov 2023 22:13:20 GMT for the UTC string. Your local time and the relative time depend on your time zone and today's date. In the other panel, Date and time starts at 2023-11-14 22:13:20 with Interpret as UTC, which gives back 1700000000 seconds and 1700000000000 milliseconds.

Limits and edge cases

Frequently asked questions

What is epoch time?

Epoch time is another name for Unix time. It is the number of seconds (or milliseconds) since midnight on January 1, 1970, UTC. The terms epoch time, Unix timestamp and POSIX time are interchangeable.

How can I tell if a timestamp is in seconds or milliseconds?

Count the digits. Ten digits (such as 1700000000) is seconds and thirteen digits (1700000000000) is milliseconds. This converter does the same check when Auto-detect is on.

Is a Unix timestamp the same in every time zone?

Yes. A timestamp names one instant, so it is identical everywhere. Only the readable date changes, which is why this page shows the UTC date and your local date side by side.

What happens to Unix time in 2038?

Systems that store Unix time as a signed 32-bit integer overflow on January 19, 2038 at 03:14:07 UTC and wrap to a date in 1901. Most modern platforms use 64-bit values, but old embedded devices and legacy software may need patching.

How do I get the current Unix timestamp in code?

In JavaScript, Math.floor(Date.now() / 1000) gives seconds and Date.now() gives milliseconds. In Python, int(time.time()) gives seconds and int(time.time() * 1000) gives milliseconds.

Sources: The Open Group, POSIX.1-2017, section 4.16; MDN, JavaScript Date.

Related reading: Cron Expressions Explained: How to Schedule Tasks