N

Runs in your browser · nothing is uploaded

Epoch & Unix Timestamp Converter

An epoch converter for seconds or milliseconds: get ISO 8601 UTC and your local time — or turn dates with a time zone back into epoch — one per line, for as many lines as you paste, with the current epoch ticking live.

Current epoch: 0 seconds · 0 milliseconds

Date input must include Z or a numeric timezone offset. Calendar values beyond the JavaScript date range are rejected.

How the conversion works

  • Seconds → date1 January 1970 00:00:00 UTC + timestamp × 1,000 ms
  • Milliseconds → date1 January 1970 00:00:00 UTC + timestamp ms
  • Date → epochmilliseconds since the epoch; seconds = floor(ms ÷ 1,000)
  • Daysevery day is exactly 86,400 seconds (leap seconds are not counted)

Each line is converted separately. In the Seconds and Milliseconds modes a result shows the input, the ISO 8601 time in UTC, the same moment in your device's local time zone, and a relative time in hours ("in 3 hours", "26,000 hours ago"). In Date to epoch mode it shows whole seconds and milliseconds. Decimal and negative timestamps are accepted.

Date input must include Z or a numeric timezone offset. Calendar values beyond the JavaScript date range are rejected.

Debugging a log or an API response? Paste the whole column of timestamps at once. If every result lands in January 1970, switch to Milliseconds; if they land thousands of years ahead, switch to Seconds. A result that is off by a whole number of hours usually means a date was stored as local time without its offset somewhere upstream.

Worked example

Seconds mode, three lines pasted at once:

InputUTC (ISO 8601)
18000000002027-01-15T08:00:00.000Z
01970-01-01T00:00:00.000Z
-864001969-12-31T00:00:00.000Z

Milliseconds mode keeps the fraction: 1800000000123 → 2027-01-15T08:00:00.123Z.

Date to epoch — three ways of writing one instant give one answer:

InputSeconds
2026-10-15T09:30:00-04:001792071000
2026-10-15T13:30:00Z1792071000
2026-10-15T19:00:00+05:301792071000

These are rejected because their time zone is missing or not in ±hh:mm form:

  • 2026-10-15T09:30:00 — rejected
  • 2026-10-15T09:30:00+0530 — rejected
  • 2026-10-15T09:30:00z — rejected

Epoch landmarks and getting "now"

Timestamps worth recognizing

MomentSecondsUTC
The Unix epoch01970-01-01T00:00:00.000Z
First 10-digit timestamp1,000,000,0002001-09-09T01:46:40.000Z
Signed 32-bit limit (Year 2038)2,147,483,6472038-01-19T03:14:07.000Z
Unsigned 32-bit limit4,294,967,2952106-02-07T06:28:15.000Z
Latest JavaScript date8,640,000,000,000+275760-09-13T00:00:00.000Z

Software that stores time in a signed 32-bit integer overflows after the 2038 value. If you see dates in December 1901 or January 1970 where you expected something recent, an overflow or a seconds/milliseconds mix-up is the usual cause.

Current epoch in common languages

WhereCodeUnit
JavaScriptDate.now()milliseconds
Pythontime.time()seconds (float)
Unix shelldate +%sseconds
JavaSystem.currentTimeMillis()milliseconds
PHPtime()seconds
PostgreSQLextract(epoch from now())seconds (decimal)

JavaScript and Java count milliseconds; most other languages and databases count seconds. When passing timestamps between them, divide or multiply by 1,000 at the boundary and name fields clearly, such as created_at_ms. For storing dates in text, ISO 8601 / RFC 3339 with an explicit offset — the format this tool outputs — avoids both mistakes.

Sources: IEEE Std 1003.1 (POSIX), "Seconds Since the Epoch"; ECMAScript Language Specification, "Time Values and Time Range"; RFC 3339 (Date and Time on the Internet: Timestamps); Python, Java, PHP and PostgreSQL documentation for the functions listed. Checked 15 October 2026.

Frequently asked questions

What is a Unix timestamp?+

It's the number of seconds since 00:00:00 UTC on 1 January 1970, called the Unix epoch. It's the same number everywhere in the world at a given instant, which is why servers, databases and APIs use it. Times before 1970 are negative.

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

Count the digits. Present-day timestamps are 10 digits in seconds and 13 in milliseconds. If you convert a millisecond value as seconds, you get a date tens of thousands of years in the future — and a second value read as milliseconds lands in January 1970. Pick the Seconds or Milliseconds mode to match.

Why does a date need Z or a time zone offset?+

Because "2026-10-15 09:30" is a different instant in New York than in London, so it has no single epoch value. End the date with Z for UTC, or an offset such as -04:00 or +05:30, for example 2026-10-15T09:30:00-04:00. The offset must include the colon; +0530 is rejected.

What is the Year 2038 problem?+

Systems that store Unix time in a signed 32-bit integer can count only to 2,147,483,647, which is 2038-01-19 03:14:07 UTC. One second later the value wraps to 1901-12-13. Modern systems use 64-bit time; this converter uses JavaScript numbers and isn't affected.

Can I convert many timestamps at once?+

Yes. Paste one value per line and press Generate / convert. Blank lines are skipped, and each result line shows the input, the ISO 8601 UTC time, your local time and how far away it is in hours. If any line is invalid, the tool stops and reports the error rather than guessing.

How are leap seconds handled?+

They aren't counted, which is how Unix time is defined. Every day is exactly 86,400 seconds, so a timestamp maps cleanly to a calendar date and clock time. The cost is that the 27 leap seconds added since 1972 don't appear in Unix time.

What is the largest date it can convert?+

JavaScript dates cover 100 million days either side of the epoch, up to +275760-09-13T00:00:00Z. Values beyond that are rejected with "Invalid date range" instead of producing a wrong date.

Is the local time shown in my time zone?+

Yes. The UTC column is the same for everyone; the local column uses your device's time zone and date format. For example, timestamp 1000000000 is 2001-09-09T01:46:40Z in UTC, which is the evening of 8 September 2001 in the continental US.

How do I get the current Unix timestamp?+

The page shows it live, in seconds and milliseconds, just above the buttons. In code: Math.floor(Date.now() / 1000) in JavaScript, int(time.time()) in Python, date +%s in a Linux or macOS shell, and time() in PHP.

Can it convert microsecond or nanosecond timestamps?+

Not directly — it reads seconds or milliseconds. Present-day microsecond timestamps have 16 digits and nanosecond ones 19. Divide by 1,000 (microseconds) or 1,000,000 (nanoseconds) — or simply drop the last 3 or 6 digits — to get milliseconds, then use Milliseconds mode.

Are my timestamps sent anywhere?+

No. Conversion uses your browser's built-in Date and Intl functions. Nothing you paste is uploaded, logged or saved.