Unix Timestamp Converter

Turn an epoch timestamp into a human-readable date in UTC and your time zone, or convert any date and time into a Unix timestamp.

Current Unix time (seconds)
—
Milliseconds
—

Timestamp to date

UTC—
Your time zone—
ISO 8601—
Relative—
Read as—

Date to timestamp

Seconds
—
Milliseconds
—

🔒 Runs entirely in your browser. Nothing you enter is sent to a server.

Computers rarely store dates as “28 October 2026, 12:00”. They store a single number instead: the seconds since the start of 1970. That number, the Unix timestamp, appears in logs, databases, APIs and tokens. This converter turns timestamps into readable dates and readable dates back into timestamps, and shows the current Unix time ticking live.

How to use the timestamp converter

Timestamp to date

  1. Paste a timestamp into the first box.
  2. Leave the unit on Detect automatically, or choose seconds, milliseconds, microseconds or nanoseconds.
  3. Read the date in UTC, in your own time zone, in ISO 8601 format and relative to now.

Date to timestamp

  1. Pick a date and time.
  2. Choose whether that time is in UTC or your local time zone.
  3. Copy the result in seconds or milliseconds.

How Unix time works

Unix time starts at the epoch, 1 January 1970 at 00:00:00 UTC, which has the value 0. Every second adds one. Each day is treated as exactly 86,400 seconds, and leap seconds are ignored.

Timestamp (s)  = (date − 1970-01-01T00:00:00Z) in seconds
Timestamp (ms) = Timestamp (s) × 1,000
Days since epoch = Timestamp (s) ÷ 86,400

Different systems use different precisions:

Unit Digits today Used by
Seconds 10 Unix shells, PHP, Python time.time() (integer part), JWTs
Milliseconds 13 JavaScript Date.now(), Java, many JSON APIs
Microseconds 16 PostgreSQL internals, some logging systems
Nanoseconds 19 Go UnixNano(), high-resolution tracing

Worked example

Convert 1793188800.

  • It has 10 digits, so it is in seconds.
  • 1,793,188,800 ÷ 86,400 = 20,754.5, so it is 20,754 whole days after the epoch.
  • The remainder is 1,793,188,800 − 20,754 × 86,400 = 43,200 seconds, exactly 12 hours.
  • Counting 20,754 days on from 1 January 1970 lands on 28 October 2026.
  • Adding the 12 hours gives Wednesday 28 October 2026, 12:00:00 UTC.

In New York (UTC−4 on that date) the same moment is 08:00, and in Tokyo (UTC+9) it is 21:00. The timestamp is the same everywhere.

Getting the current timestamp in code

JavaScript:   Math.floor(Date.now() / 1000)
Python:       int(time.time())
PHP:          time()
Bash:         date +%s
SQL (MySQL):  UNIX_TIMESTAMP()
PostgreSQL:   EXTRACT(EPOCH FROM now())

Tips and pitfalls

  • Mixing seconds and milliseconds is the most common bug. A seconds value read as milliseconds lands in January 1970. A milliseconds value read as seconds lands tens of thousands of years in the future.
  • Store UTC, display local. Save timestamps in UTC and convert to a time zone only when showing them to a person.
  • Watch daylight saving time. A local time like 02:30 can happen twice, or not at all, on the day clocks change. Converting in UTC avoids ambiguity.
  • Check 32-bit fields. Anything that stores seconds in a signed 32-bit integer will overflow on 19 January 2038.
  • ISO 8601 is the safest text format. When a timestamp must be human-readable, 2026-10-28T12:00:00Z sorts correctly and includes the time zone.

Frequently asked questions

What is a Unix timestamp?

A Unix timestamp, or epoch time, is the number of seconds that have passed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. It is the same everywhere in the world at a given moment, which makes it ideal for storing and comparing times.

How do I tell whether a timestamp is in seconds or milliseconds?

Count the digits. Present-day timestamps have 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. The converter detects this automatically, and you can override it with the unit menu.

Do Unix timestamps have a time zone?

No. A timestamp is always counted from midnight UTC, so it represents one exact moment. Time zones only come in when you display it as a date and time, which is why the converter shows both UTC and your local time.

What is the year 2038 problem?

Systems that store timestamps as signed 32-bit integers can only count up to 2,147,483,647, which is reached at 03:14:07 UTC on 19 January 2038. One second later the value wraps around to 1901. Modern systems use 64-bit integers, which last for billions of years.

Can a Unix timestamp be negative?

Yes. Negative timestamps represent dates before 1970. For example, −86400 is 31 December 1969 at 00:00 UTC.

Last updated October 28, 2026 · By the ZTool team