Skip to content

Unix Timestamp Converter

Convert a Unix timestamp to ISO 8601, UTC, local and relative time, or turn any date back into one. Auto-detects seconds vs milliseconds, in your browser.

Runs entirely in your browser. Nothing you paste here is sent to us or anyone else โ€” there is no server processing, no logging of input, and no third-party scripts on this page.

A Unix timestamp converter turns a raw epoch number into human-readable dates โ€” ISO 8601, a UTC string, your local time, and a relative phrase like “3 hours ago” โ€” and turns a date you pick back into a timestamp. The tool above does both directions in your browser, auto-detects whether your number is in seconds or milliseconds, and shows a live current Unix time that ticks every second. Nothing you enter is transmitted anywhere.

What is a Unix timestamp?

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, the moment known as the Unix epoch. Because it is a single integer with no time zone attached, it is the most compact and unambiguous way to record an instant. Databases, log files, JWTs, HTTP headers, and APIs all lean on it heavily. A value like 1700000000 corresponds to 14 November 2023, 22:13:20 UTC.

Seconds vs milliseconds

The original Unix convention counts seconds, so a present-day timestamp has about 10 digits. Many newer systems โ€” JavaScript’s Date.now() and getTime(), Java, and a lot of logging and analytics platforms โ€” count milliseconds instead, which adds three digits and makes a present-day value roughly 13 digits long. The two are easy to confuse, and feeding a milliseconds value into a seconds parser lands you thousands of years in the future.

This converter auto-detects the unit from the number’s size: 13 or more digits is treated as milliseconds, shorter as seconds. When a value is genuinely ambiguous you can override the guess with the Unit menu and force Seconds or Milliseconds.

Value Unit Resolves to (UTC)
1700000000 seconds 14 Nov 2023 22:13:20
1700000000000 milliseconds 14 Nov 2023 22:13:20
0 seconds 1 Jan 1970 00:00:00 (the epoch)
-86400 seconds 31 Dec 1969 00:00:00

A worked example

Say a log line records 1700000000. Paste it into the timestamp box. With auto-detect it is read as seconds, and you get the ISO 8601 form 2023-11-14T22:13:20.000Z, the UTC string, your local-time equivalent, and a relative phrase measured against your clock. To go the other way, pick a date and time in the reverse panel โ€” it is read in your local time zone โ€” and read off the Unix value in both seconds and milliseconds, plus the matching UTC ISO string so you can double-check the instant.

The Year 2038 problem

Many older systems store Unix time in a signed 32-bit integer. The largest value that holds is 2,147,483,647 seconds, which is reached at 03:14:07 UTC on 19 January 2038. One second later the counter overflows into negative territory and the date silently wraps back to December 1901 โ€” a genuine bug sometimes called the “Y2K38” problem. The remedy is to store timestamps in a 64-bit integer, which moves the ceiling roughly 292 billion years out. Most modern platforms have already made this change, but embedded devices and legacy file formats can still be caught out, so it is worth checking when you work with long-lived data.

Common use cases

  • Reading a timestamp out of a log line, database row, or API response.
  • Checking a JWT’s iat or exp claim, which are Unix seconds.
  • Generating a timestamp to hard-code into a test fixture or a config value.
  • Sanity-checking whether a suspiciously large number is in milliseconds.
  • Working out how long ago an event happened with the relative readout.

Runs entirely in your browser

This tool makes no network calls. The conversions use the browser’s native Date object on your own device, so nothing you paste is uploaded, logged, or shared. You can load the page once and keep using it offline. Note that dates are limited to the ECMAScript range of about 275,760 years either side of 1970; values beyond that are reported as out of range rather than shown incorrectly.

Frequently asked questions

What is a Unix timestamp?

A Unix timestamp is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, known as the Unix epoch. It is a single integer with no time zone, which makes it a compact, unambiguous way to store an instant in time.

How does the tool tell seconds from milliseconds?

It looks at the magnitude of the number. A timestamp with 13 or more digits (roughly a value of a trillion or more) is read as milliseconds; a shorter one is read as seconds. Auto-detect handles the common cases, and you can force Seconds or Milliseconds from the Unit menu if a value is ambiguous.

Why do some timestamps have 13 digits?

Those are in milliseconds. JavaScript's Date.now() and getTime(), Java, and many logging systems count milliseconds since the epoch rather than seconds, which adds three extra digits. Divide by 1000 to get the equivalent value in seconds.

What is the Year 2038 problem?

Systems that store Unix time in a signed 32-bit integer can only count up to 2,147,483,647 seconds, which is reached at 03:14:07 UTC on 19 January 2038. One second later the value overflows to a negative number and the date wraps back to December 1901. The fix is to store time in a 64-bit integer, which pushes the limit hundreds of billions of years into the future.

Is the conversion sent to a server?

No. Every calculation runs in your browser with the built-in Date object. Nothing you type is uploaded, logged, or stored, and the tool keeps working with the network disconnected.

Which time zone does the reverse converter use?

The date-and-time picker is interpreted in your computer's local time zone, then converted to a timestamp. The tool also shows the matching ISO 8601 value in UTC so you can confirm the instant regardless of where you are.

Can it handle dates before 1970?

Yes. Timestamps before the epoch are negative, and the converter displays them correctly. For example -86400 is 31 December 1969 at midnight UTC, one day before the epoch.

How accurate is the relative time?

The relative label ("3 hours ago", "in 2 days") is calculated against your device clock at the moment you convert. It uses approximate month and year lengths, so for spans of months or years it is a close estimate rather than a calendar-exact count.