Unix Timestamp Converter

Convert a Unix timestamp in seconds or milliseconds to a readable date in your time zone, UTC and ISO 8601, or type a date to get its timestamp. Free, instant and calculated in your browser, so nothing you paste is uploaded.

Unix Timestamp ConverterPrivate · runs on your device
Input
Words 0Characters 0Lines 0
Converted

Example: 1700000000 → ISO 8601: 2023-11-14T22:13:20.000Z

How to use the Unix timestamp converter

One box handles both directions, and the result updates as you type.

  1. Look at the Current Unix time banner at the top. It counts up every second, and clicking it drops the current value into the input.
  2. Paste a timestamp, or a date such as 2024-05-01 14:30, into the input box.
  3. Leave Timestamp unit on Auto detect, or force Seconds or Milliseconds. Auto reads any number of 100,000,000,000 or more as milliseconds, and anything smaller as seconds.
  4. Read the Converted block: Local time, UTC, ISO 8601, Unix seconds, Unix millis, Relative, Day of week, Day of year and your time zone with its offset.
  5. Read the line under the output, which tells you how the input was interpreted.

The example 1700000000 gives 2023-11-14T22:13:20.000Z and a UTC line of Tue, 14 Nov 2023 22:13:20 GMT. The same instant as 1700000000000 is read as milliseconds and gives an identical result. Everything runs in the page, so values from your logs stay on your device.

Typical uses are reading a created_at column in a database export, checking when a session or cache entry expires, working out what a log line from a server in another zone really says, and producing a timestamp for a test fixture by typing the date you want.

Seconds, milliseconds and dates that go wrong

Unix time counts the seconds since 00:00:00 UTC on 1 January 1970 and ignores leap seconds. It is a single integer with no time zone, which is why databases, APIs and JWT claims use it. Turning it into a calendar date means choosing a zone, so one timestamp can fall on different dates in Tokyo and Los Angeles. PHP time() and Python time.time() return seconds, while JavaScript Date.now() and Java return milliseconds, so today a 10-digit value is seconds and a 13-digit value is milliseconds.

  • Small millisecond values. Auto detect cannot tell that 86400000 is one day in milliseconds. It reads it as seconds and shows 1972, so switch Timestamp unit to Milliseconds.
  • Date-only text. JavaScript reads 2024-05-01 as midnight UTC but 2024-05-01 14:30 as local time, so the two can differ by your zone offset even though the note says local.
  • Digit strings. An 8-digit value like 20240501 is a number, not a date, so it is read as seconds in 1970.
  • Negative values are accepted and give dates before 1970; fractions of a second are kept.

The UTC line uses the HTTP-date style ending in GMT, as in email and server headers.

The year 2038 limit and storing time safely

A signed 32-bit integer can hold at most 2,147,483,647. As a timestamp that is 03:14:07 UTC on 19 January 2038, and one second later the counter wraps to a negative number that reads as December 1901. Enter 2147483648 and the tool adds a note that it is beyond the 32-bit limit. Modern systems use 64-bit values, but embedded devices, old file formats and some database columns still carry the limit.

  • Store times as 64-bit integers or a native timestamp type.
  • Keep stored times in UTC and convert only for display.
  • Agree whether an API sends seconds or milliseconds, and write it down.
  • In JavaScript, new Date(n) wants milliseconds, so multiply seconds by 1000.
  • Do not add 86,400 seconds per day across a daylight saving change; use a calendar-aware library.

Related jobs have their own tools. To measure the gap between two dates in days and months, use the date difference calculator. To compare the same moment in several cities, use the time zone converter. To convert a duration between hours, days and weeks, use the time converter, and to read the exp claim of a token, the JWT decoder.

To get the current value in code, use Math.floor(Date.now() / 1000) in JavaScript, time() in PHP, int(time.time()) in Python or date +%s in a Linux shell.

Quick answers

Frequently asked questions

The questions people ask most, answered in plain words.

What is the current Unix timestamp?

It is the number of seconds since 1 January 1970 UTC right now, and the converter shows it live at the top of the page, ticking every second. Timestamps in the 2020s are ten-digit numbers beginning with 16 or 17. Multiply by 1000 for the millisecond form that JavaScript uses.

How do I know if a timestamp is in seconds or milliseconds?

Count the digits: current values have ten digits in seconds and thirteen in milliseconds. Auto detect treats numbers of 100,000,000,000 or more as milliseconds. If the result lands in 1970 or thousands of years away, switch the Timestamp unit setting to the other option.

Why does the converted date differ from my server log?

Almost always because of time zones. A timestamp is an absolute instant, but a log formats it in the server zone, often UTC, while the converter shows your local zone beside UTC. Compare the UTC line with the log and check whether the logged value was in milliseconds.

What is the year 2038 problem?

A signed 32-bit integer cannot hold a Unix time larger than 2,147,483,647, which is reached on 19 January 2038. After that the counter overflows to a negative number and the date reads as 1901. Software using 64-bit time values is unaffected, but older embedded systems and file formats may fail.

Does Unix time include leap seconds?

No. Unix time assumes every day has exactly 86,400 seconds, so when a leap second is added the clock repeats a second or spreads it across the day. This keeps timestamp arithmetic simple, at the cost of sitting up to one second away from true UTC around those events.