How-to guide

How to Convert a Unix Timestamp to a Date and Back

Updated 2026-12-041564+ wordsFree tools · no signup

To convert a Unix timestamp, count the seconds since 00:00:00 UTC on 1 January 1970: the number 1700000000 is 1,700,000,000 seconds after that moment, which is Tuesday 14 November 2023, 22:13:20 UTC. Divide by 86,400 (the seconds in a day) to get days since the epoch, and divide by 1,000 first if the value has 13 digits, because that means milliseconds. The free Unix Timestamp Converter on Hellagape does this instantly as you type, converting timestamps to dates and dates to timestamps in any time zone, with nothing sent to a server. This guide shows the tool steps, the hand method behind them, and the two traps — seconds vs milliseconds and timezone rendering — that cause nearly every wrong result.

At a glance

  • What it is: Unix time (epoch time) counts seconds since 00:00:00 UTC, 1 January 1970. Zero is that exact moment; negative numbers are dates before 1970.
  • What you get: a readable date and time, in UTC or rendered in a time zone you choose.
  • What it is not: the timestamp itself has no time zone. A zone only enters when the number is displayed as a date.
  • Tool: Unix Timestamp Converter — free, no account, instant result, runs in your browser.

How to convert a Unix timestamp with the Hellagape tool

  1. Open the Unix Timestamp Converter.
  2. Paste the timestamp into the "Input to convert" box.
  3. Read the converted date, which updates instantly as you type. There is nothing to upload and no account to create.
  4. Copy the result into your log notes, spreadsheet or documentation.
  5. To go the other way — a date back to a timestamp — enter the date instead; the tool converts in both directions. A dedicated companion, Date to Timestamp, covers the reverse direction on its own page.

Before you trust the output, run the digit check below: if your value has 13 digits it is milliseconds, and feeding it to a seconds-based conversion (or the reverse) is the single most common cause of absurd dates.

The method: seconds since the epoch

A Unix timestamp is one number: the seconds elapsed since 00:00:00 UTC on 1 January 1970, not counting leap seconds — every day is treated as exactly 86,400 seconds. Converting by hand is unit arithmetic:

  • Seconds → days: divide by 86,400. The whole-number part is days since the epoch; the remainder is the time of day.
  • Milliseconds → seconds: divide by 1,000 first (keep the fraction if you need sub-second precision).
  • Date → timestamp: count the days from 1970-01-01 to your date, multiply by 86,400, and add the seconds in the time of day — all in UTC, then render in a zone if needed.

Two rules cover nearly every real value you will meet:

DigitsUnitExampleWhere it occurs
10Seconds1700000000Unix/Linux date +%s, PHP time(), most databases
13Milliseconds1700000000000JavaScript Date.now(), Java, many REST APIs

The digit rule holds for current dates: second-based values stay 10 digits until the year 2286, millisecond values 13 digits far longer. If a conversion lands in January 1970 or tens of thousands of years in the future, the unit is wrong — divide or multiply by 1,000 and try again.

Time zones are the second trap. The timestamp names one instant worldwide; only the display picks a zone. The instant 1700000000 is 22:13:20 on Tuesday 14 November 2023 in UTC, and 14:13:20 the same day in Los Angeles (PST, UTC−8). Same number, same moment, different wall clocks. When a converted time is off by a round number of hours, the arithmetic is right and the zone is the culprit.

Worked examples

Each example below was computed and cross-checked with a script and the GNU date command, so you can verify the tool output against it.

Example 1 — the epoch itself. 0 → Thursday 1 January 1970, 00:00:00 UTC. Every other timestamp is measured from here.

Example 2 — a typical log value, by hand. 1700000000 ÷ 86,400 = 19,675.9259… days. Whole days: 19,675 × 86,400 = 1,699,920,000. Remainder: 1,700,000,000 − 1,699,920,000 = 80,000 seconds = 22 hours (79,200 s) + 13 minutes (780 s) + 20 seconds. The epoch plus 19,675 days is Tuesday 14 November 2023, so the answer is Tue 14 Nov 2023, 22:13:20 UTC — or 14:13:20 PST the same day in Los Angeles.

Example 3 — the same instant in milliseconds. 1700000000000 has 13 digits, so divide by 1,000 → 1,700,000,000 seconds → the identical instant, Tue 14 Nov 2023, 22:13:20 UTC. Read as seconds instead, it would land tens of thousands of years in the future — the classic unit error.

Example 4 — a midnight boundary. 1764288000 → Friday 28 November 2025, 00:00:00 UTC. In Los Angeles that instant is still Thursday 27 November, 16:00:00 PST — a reminder that "midnight UTC" is yesterday afternoon on the US west coast.

Example 5 — before 1970. -86400 → Wednesday 31 December 1969, 00:00:00 UTC: negative values simply count backwards from the epoch, one day per −86,400.

Example 6 — date back to timestamp. Friday 4 December 2026, 00:00:00 UTC → 1796342400. (Noon the same day, 12:00:00 UTC, is 1796385600 — exactly 43,200 seconds, half a day, later.)

Example 7 — the 32-bit ceiling. 2147483647 → Tuesday 19 January 2038, 03:14:07 UTC. This is the largest value a signed 32-bit integer can hold; one second later such systems overflow (the Year 2038 problem). Modern 64-bit systems are unaffected.

Tips and common mistakes

  • Count the digits first. 10 digits = seconds, 13 = milliseconds. JavaScript's Date works in milliseconds, so seconds must be multiplied by 1,000 there; Unix tooling and most databases use seconds. Mixing them up gives January 1970 or a date tens of thousands of years ahead.
  • Pin the time zone. A timestamp is UTC-pure; only rendering adds a zone. If a result is shifted by exactly 1–14 hours, compare the UTC rendering with your local one before touching the arithmetic, and use full zone names (such as America/Los_Angeles) rather than fixed offsets, which break across daylight-saving changes.
  • Leap seconds do not exist here. Unix time treats every day as exactly 86,400 seconds, so it drifts a few seconds from atomic time by design. For log and API work this is irrelevant; do not "correct" for leap seconds.
  • Negative means before 1970. Historical dates convert fine as negative numbers (−86400 is 31 December 1969). If a tool rejects negatives, it is a tool limit, not a timestamp rule.
  • Watch the 2038 ceiling in old systems. Anything storing Unix time in a signed 32-bit integer overflows at 03:14:07 UTC on 19 January 2038. Embedded firmware and legacy database columns are the real exposure; new storage should be 64-bit.

Frequently asked questions

What is a Unix timestamp? It is the number of seconds elapsed since 00:00:00 UTC on 1 January 1970, the Unix epoch. The value 1700000000, for example, is 22:13:20 UTC on 14 November 2023. It is also called epoch time or POSIX time.

How do I convert a Unix timestamp to a date? Paste it into a converter such as the Unix Timestamp Converter and read the result, which updates instantly. By hand, divide by 86,400 to get days since 1 January 1970, with the remainder as the time of day in UTC.

How do I know if a timestamp is in seconds or milliseconds? Count the digits: current second-based timestamps have 10 digits (1700000000) and millisecond timestamps have 13 (1700000000000). Divide milliseconds by 1,000 before converting as seconds.

Why is my converted time off by a few hours? The timestamp is always UTC, but the display renders it in a local time zone. A shift of exactly 1–14 hours means the arithmetic is correct and the zone differs — compare the UTC rendering with your local one, and pin the zone explicitly wherever you convert.

How do I convert a date back to a Unix timestamp? Count the days from 1 January 1970 to your date in UTC, multiply by 86,400, and add the seconds in the time of day. For example, 4 December 2026, 00:00:00 UTC is 1796342400. The Hellagape converter works in both directions.

What is the Year 2038 problem? Systems storing Unix time in a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038 (timestamp 2147483647), wrapping to negative values and dates in 1901. 64-bit platforms and modern languages are unaffected; the risk lives in embedded and legacy systems.

Can a Unix timestamp be negative? Yes. Negative values are dates before the epoch: −86400 is 31 December 1969, 00:00:00 UTC. Each −86,400 steps back one more day.

Is my data sent to a server when I convert? No. The Hellagape tool runs entirely in your browser; the page states "Typing updates the result instantly. Nothing is sent anywhere." Closing the tab clears the data, which matters for timestamps copied from private logs.

Try it now

Unix Timestamp Converter

Convert Unix timestamps to dates and dates to timestamps in any time zone.

Open the free tool