Unix Timestamp Converter

Convert Unix epoch timestamps to dates and back — UTC, local, ISO and relative.

Free Unix timestamp converter. Turn epoch seconds or milliseconds into human-readable UTC, local, and ISO 8601 dates with a relative ("3 hours ago") label, and convert any date back to a timestamp. Runs entirely in your browser — nothing is uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

Is my timestamp sent anywhere?

No. The conversion happens entirely in your browser using the built-in JavaScript Date object. Nothing is uploaded to any server.

Embed this tool

Drop this free tool into your own site or blog. It runs entirely in your visitor's browser — nothing is sent to us.

<iframe src="https://geratools.com/embed/unix-timestamp-converter" width="100%" height="600" style="border:1px solid #e5e7eb;border-radius:8px" title="Unix Timestamp Converter — GeraTools" loading="lazy"></iframe>

Unix timestamp converter

A Unix timestamp (also called epoch 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. It is the most common way software stores an instant — in databases, log files, API responses, JWT tokens, and system calls — because it is a single number that is completely independent of time zones. This converter turns epoch values into readable dates and converts any date back into a timestamp, all in your browser.

Reading an epoch value

Enter an epoch value and choose seconds or milliseconds. The tool multiplies seconds by 1000 to build a JavaScript Date, then formats it four ways:

  • UTC — the time at the zero-meridian, with no offset. This is the authoritative time the timestamp encodes.
  • Local — shifted by your browser’s current time zone and daylight saving rule, so you can see what time it was in your clock timezone.
  • ISO 8601 — the machine-readable standard form: 2021-01-01T00:00:00.000Z. The trailing Z means UTC.
  • Relative — a human-readable label such as “3 hours ago” or “in 2 days”, computed from the current moment.

The reverse direction takes a date and time from the picker and reports the matching epoch seconds and milliseconds.

Seconds vs milliseconds — how to tell which you have

A 10-digit number is almost certainly in seconds. A 13-digit number is almost certainly in milliseconds. The two are related by a factor of exactly 1000.

ValueDigit countUnitResolves to (UTC)
01seconds1970-01-01 00:00:00
160945920010seconds2021-01-01 00:00:00
160945920000013milliseconds2021-01-01 00:00:00

Reading a millisecond value as seconds points far into the future; reading a second value as milliseconds sends you to early 1970. The “1 January 1970” result almost always means you fed a seconds value into milliseconds mode (or passed zero or null somewhere upstream).

Common sources of epoch timestamps

  • JWT tokens: the exp, iat, and nbf claims are Unix timestamps in seconds. Paste the number to see when a token expires.
  • HTTP headers: Last-Modified and Expires use formatted dates, but X-RateLimit-Reset often carries a Unix timestamp in seconds.
  • Log files: most logging frameworks emit milliseconds; older syslog-format timestamps are seconds.
  • Databases: PostgreSQL stores TIMESTAMPTZ internally as microseconds since the epoch; MySQL’s UNIX_TIMESTAMP() returns seconds.
  • JavaScript: Date.now() returns milliseconds; Math.floor(Date.now() / 1000) gives seconds.

The Year 2038 problem

Systems that store Unix time in a signed 32-bit integer overflow on 19 January 2038 at 03:14:07 UTC, when the value exceeds 2,147,483,647 seconds. This was a real concern for embedded devices and 32-bit C code. Modern 64-bit systems store timestamps as int64 or equivalent, pushing the overflow hundreds of billions of years into the future — but old database columns typed as INT instead of BIGINT can still be affected.

Tips

  • Negative timestamps represent dates before the epoch (before 1 January 1970). This is valid and well-supported in modern runtimes.
  • When comparing timestamps across services, always canonicalise to the same unit — mixing seconds and milliseconds in a comparison is a silent, frequent bug.
  • Everything runs in your browser using the built-in Date object — nothing you type is ever uploaded.

The formal definition, and its one deliberate lie

POSIX defines “seconds since the Epoch” precisely — see the Open Group’s definition — as a count that excludes leap seconds, treating every day as exactly 86,400 seconds. That simplification is what makes epoch arithmetic safe (day boundaries are always multiples of 86,400) at the cost of the count drifting from the true number of elapsed SI seconds. For application work — tokens, expiries, logs, scheduling — the simplification is exactly what you want; specialised time scales exist for metrology. The value’s other great property is universality: an epoch second is identical in every time zone and locale, which is why it is the interchange format of choice between systems that must never disagree about ordering. In JavaScript specifically, Date counts in milliseconds since the same epoch — the thousandfold difference described above.