Unix timestamp converter

Paste a timestamp to read it as a date, or pick a date to get its timestamp.

Current Unix time

Seconds
Milliseconds

Timestamp to date

Unit

Date to timestamp

Time zone

How to use it

The card at the top shows the current Unix time in seconds and in milliseconds, and moves every second. Copy either value, or press “Use now” to read it in the converter below.

Paste a timestamp in “Timestamp to date”. With the unit on Auto it is read by its length: up to 11 digits as seconds, 12 to 14 as milliseconds, 15 to 17 as microseconds, 18 or 19 as nanoseconds. Each range covers the dates from 1973 to 5138, so a timestamp from this century is never ambiguous; if yours comes from a system that counts in another unit, choose it by hand. The table gives the date in your time zone and in UTC, in the formats programs exchange, and how long ago or how far ahead it is. “How it was read” shows the arithmetic.

In “Date to timestamp”, pick a date and a time and say whether they are your local time or UTC, or type an ISO 8601 date such as 2026-10-27T10:00:00Z. An offset written in the text (Z, +02:00, -0500) wins over the choice.

A worked example

Take 1700000000123. It has 13 digits, so it is read as milliseconds:

  1. 1,700,000,000,123 ms ÷ 1,000 = 1,700,000,000.123 s
  2. 1,700,000,000 s ÷ 86,400 s per day = 19,675, remainder 80,000 s
  3. 19,675 days after 1970-01-01 is 2023-11-14
  4. 80,000 s = 22 h 13 min 20 s, so the time is 22:13:20.123 UTC

In Mexico City (UTC−06:00) that is 16:13:20 on the same day; in India (UTC+05:30) it is 03:43:20 the next morning. One timestamp, three wall clocks.

What Unix time is

Unix time counts the seconds since 1970-01-01 at 00:00:00 UTC, a moment called the epoch. It ignores leap seconds: every day counts as exactly 86,400 seconds, so the 27 leap seconds added since 1972 do not appear in it. That keeps date arithmetic simple: add 86,400 for a day and 3,600 for an hour.

A timestamp has no time zone. 1700000000 is the same instant everywhere on Earth; a time zone only appears when the instant is shown as a date. That is why it is safest to store and send timestamps, or ISO 8601 dates ending in Z, and to convert to local time only when showing them to a person.

Seconds or milliseconds? It depends on the platform

PlatformCurrent timeUnit
JavaScriptDate.now()milliseconds
Pythontime.time()seconds, with a fraction
Pythontime.time_ns()nanoseconds
JavaSystem.currentTimeMillis()milliseconds
Gotime.Now().Unix(), .UnixMilli(), .UnixNano()seconds, ms, ns
PHPtime()seconds
C#DateTimeOffset.UtcNow.ToUnixTimeSeconds()seconds
MySQLUNIX_TIMESTAMP()seconds
PostgreSQLEXTRACT(EPOCH FROM now())seconds, with a fraction
Shell (Linux, macOS)date +%sseconds

A few common conversions:

// JavaScript: now in seconds, and a timestamp in seconds to a Date
Math.floor(Date.now() / 1000)
new Date(1700000000 * 1000).toISOString()   // "2023-11-14T22:13:20.000Z"

# Python
from datetime import datetime, timezone
datetime.fromtimestamp(1700000000, tz=timezone.utc)

# Shell: a timestamp to a date
date -u -d @1700000000     # Linux (GNU date)
date -u -r 1700000000      # macOS

Common mistakes

  • Seconds read as milliseconds: 1700000000 read as milliseconds is 1970-01-20 at 16:13:20 UTC. A date in January 1970 almost always means this; multiply by 1,000.
  • Milliseconds read as seconds: 1700000000000 read as seconds falls in the year 55,840. Divide by 1,000.
  • Local time saved as if it were UTC: the result is off by your offset, six hours in Mexico City for example. Convert to UTC before saving, or keep the offset with the date (2026-10-27T10:00:00-06:00).
  • Daylight saving time: where clocks change, one local hour a year does not exist and another happens twice. “Date to timestamp” tells you when the time you picked is one of them.
  • Rounding a negative timestamp toward zero: −1.5 is 23:59:58.5 on 1969-12-31, not 23:59:59. Before 1970, times round down, toward the past.

The year 2038 problem and negative timestamps

Systems that keep Unix time in a signed 32-bit integer can count up to 2,147,483,647, which is 2038-01-19 at 03:14:07 UTC. One second later the counter wraps around to −2,147,483,648, and the date reads 1901-12-13 at 20:45:52 UTC. Most systems now use 64-bit time, but old file formats, databases and embedded devices may still use 32 bits; MySQL’s TIMESTAMP column type, for example, ends at that same second in 2038.

Negative timestamps are dates before 1970: −86,400 is 1969-12-31 at 00:00:00 UTC, and the Apollo 11 landing, on 1969-07-20 at 20:17 UTC, is −14,182,980. Some systems refuse them, so check before storing old dates as timestamps.

Login tokens carry their dates as Unix timestamps in seconds (exp, iat, nbf); the JWT decoder reads them for you and says whether the token has expired.

Questions

Why does my program show a date in 1970?

Somewhere a timestamp in seconds was read as milliseconds. JavaScript’s new Date() expects milliseconds, so multiply a timestamp in seconds by 1,000 first. Here, with the unit on Auto, 10 digits are read as seconds.

Is Unix time the same all over the world?

Yes. It counts seconds from one instant, so two computers in different countries get the same number at the same moment, as long as their clocks are right.

Which time zone does this page use?

Your browser’s, which is named in the first row of the table. UTC and the ISO 8601 date ending in Z are the same for everyone.

What is the largest date it can show?

Browsers handle dates up to 100,000,000 days on either side of 1970, that is, 8,640,000,000,000 seconds: from the year −271,821 to the year 275,760.

More developer tools

See all tools