Format Code Now
/
ConvertUnix Timestamp Converter Next: XML to JSON ›

Epoch Converter and Unix Timestamp Converter

CV-04

Paste a Unix timestamp to see it as a date in UTC and in your local time, or type a date to get the timestamp. Leave the box empty and press Convert for the current epoch time. It runs in your browser and nothing is uploaded.

Runs in your browser. Nothing is uploaded.

Timestamp or date (leave empty for now)

Result

How to use it

  1. Type a timestamp such as 1700000000, a date such as 2023-11-14 22:13:20, or leave the box empty for now.
  2. Leave Number is in on Auto, or pick Seconds or Milliseconds if you know the unit.
  3. Press Convert.
  4. Read the seconds, milliseconds, UTC, local time and relative time lines, and copy the one you need.

Seconds or milliseconds

In Auto mode, a number with 12 or more digits is treated as milliseconds and a shorter number as seconds. So 1700000000 and 1700000000000 both give 2023-11-14 22:13:20 UTC. Auto cannot tell a small millisecond value from a seconds value, so a timestamp from the first three years after 1970 in milliseconds needs the Milliseconds setting. Negative numbers give dates before 1970.

Dates to timestamps

Type a date to get its timestamp. A date without a time zone, such as 2023-11-14 22:13:20 or just 2023-11-14, is read as UTC and not as your local time. Add Z or an offset such as +02:00 to say otherwise. The result lists Unix seconds, Unix milliseconds, the UTC time in ISO 8601 format, your local time and how long ago or from now it is.

The current epoch time

Leave the box empty and press Convert to get the current moment in every format. The time is read from your device's clock when you press the button, so it is only as accurate as that clock. The local time line uses your browser's time zone, and the UTC line is the same everywhere, which makes it the one to use in logs and APIs.

Questions people ask

How do I convert an epoch timestamp to a date?

Type the timestamp and press Convert. You get the date in UTC in ISO 8601 format, in your local time, and as a relative time. The conversion runs in your browser and nothing is uploaded.

How do I tell whether a timestamp is in seconds or milliseconds?

Count the digits. In Auto mode, 12 or more digits are read as milliseconds and fewer as seconds. If the guess is wrong, set Number is in to Seconds or Milliseconds.

How do I get the current Unix time?

Leave the input empty and press Convert. The result shows now as Unix seconds, Unix milliseconds, a UTC date and your local time, taken from your device's clock.

How do I convert a date to a Unix timestamp?

Type a date such as 2023-11-14 22:13:20 or an ISO 8601 date with Z or an offset, and press Convert. The Unix seconds and milliseconds lines show the timestamp.

What time zone does a date without a zone use?

UTC. A date with no zone, like 2023-11-14 22:13:20, is read as UTC and not as your local time. Add an offset such as +02:00 or a Z to be explicit. The local time line uses your browser's time zone.

What is epoch time?

Epoch time, also called Unix time, counts the seconds since 1 January 1970 at 00:00:00 UTC. Many systems store it as a plain number. JavaScript's Date.now() returns milliseconds instead of seconds.

About this tool

Numbers of 12 or more digits are treated as milliseconds in Auto mode. Dates without a time zone are read as UTC.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.