Home › Developer Tools › Unix Timestamp Converter

Unix Timestamp Converter

Turn a Unix timestamp, counted in seconds or milliseconds since 1970-01-01 UTC, into a date and time, or turn a date and time back into a timestamp.

Whole numbers only, for example 1700000000 or -86400. A minus sign means a time before 1970.

Write it as 2024-02-29T12:00:00Z or 2024-02-29 12:00:00. Text with no zone is read as UTC.

Enter a timestamp or a date and time.
UTC date and time-
ISO 8601 (UTC)-
Your time zone (this browser)-
Seconds since 1970 (whole, rounded down)-
Milliseconds since 1970-
This tool needs JavaScript. Everything runs in your browser. No timestamp, date or time is sent or stored.

How to use

  1. To read a timestamp, type or paste it into the Unix timestamp box. The UTC date, ISO 8601 form, your own time zone and both unit values fill in below.
  2. Leave Unit on Auto unless the guess is wrong. Pick Seconds or Milliseconds to force a reading.
  3. To go the other way, type a date and time into the Date and time (UTC) box, for example 2024-02-29T12:00:00Z. The seconds and milliseconds figures below show the timestamp.
  4. Press Now to load the current time from this browser.

Worked example

Enter 1700000000. It has ten digits, so Auto reads it as seconds. The tool shows 2023-11-14 22:13:20 UTC, the ISO form 2023-11-14T22:13:20.000Z, and 1,700,000,000,000 milliseconds. Paste the thirteen-digit 1700000000000 instead and Auto reads milliseconds, giving the same moment.

Going back, 2024-02-29T12:00:00Z becomes 1709208000 seconds, or 1709208000000 milliseconds. Negative values work too: -86400 is exactly one day before the epoch, 1969-12-31 00:00:00 UTC, and 0 is 1970-01-01 00:00:00 UTC.

How it works

Unit rule. A timestamp with 11 digits or fewer is read as seconds, and one with 12 digits or more as milliseconds. Leading zeros are not counted. Choose Seconds or Milliseconds to override the rule. A minus sign counts back from 1970. Decimals are refused, because a timestamp is a whole number of seconds or milliseconds.

Range. A JavaScript date holds up to 8,640,000,000,000,000 milliseconds either side of 1970-01-01T00:00:00Z. Values outside that range are refused.

Date and time. Enter a date and time with a zone of Z, or with no zone. Both are read as UTC. Other zones are refused. Your own zone is shown separately, using the time zone settings of this browser.

Now fills the timestamp field with the current time, read from this browser, in the selected unit. With Auto, it uses seconds.

Unix time counts the seconds since the epoch, 00:00:00 UTC on 1 January 1970, and ignores leap seconds, so every day has exactly 86,400 of them. The definition is in the POSIX section on Seconds Since the Epoch. The ISO form follows RFC 3339, the internet profile of ISO 8601.

Nothing you type is sent anywhere. Every conversion is done by your browser, and no timestamp or date is stored.

Common mistakes

Frequently asked questions

What is the Unix epoch?

It is the starting point, 1 January 1970 at 00:00:00 UTC. Timestamp 0 is that instant.

How do I tell seconds from milliseconds by eye?

Count the digits. Current dates in seconds have ten digits, and in milliseconds thirteen. That is the rule the Auto setting follows.

Why does the local time differ from the UTC time?

The local line uses your browser's time zone, including any daylight saving offset in force on that date. UTC never changes with the seasons.

Can it handle dates before 1970?

Yes. Enter a negative number or a date such as 1969-12-31T00:00:00Z.

Are my timestamps sent anywhere?

No. The conversion runs in your browser, and nothing is stored.

Related tools