Unit Converters

Unix Time Converter (Epoch to Date)

Turn a Unix timestamp into a readable date, or go the other way. You get UTC, local time, ISO 8601, milliseconds, the weekday, and a relative time string, and it handles pre-1970 negative values.

Reviewed and updated

How to use
  1. Paste a Unix timestamp, or pick a date and time.
  2. Choose seconds or milliseconds if needed.
  3. Copy the format you need.
Conversion factors are exact; rounding may affect the final digit.
Was this helpful?

A timestamp is just seconds counted from one fixed instant

Unix time (also called epoch or POSIX time) is a plain count of seconds since midnight UTC on 1 January 1970. That reference moment is value zero. Because it is one number in UTC, it names the same instant anywhere on Earth with no time zone to reconcile.

timestamp = whole seconds since 1970-01-01 00:00:00 UTC

Seconds vs milliseconds — the digit count gives it away

The same instant can be written in seconds or milliseconds, and mixing them up throws the result off by a factor of 1000. Count the digits before you trust a value: a current timestamp has 10 digits in seconds and 13 in milliseconds.

milliseconds = seconds × 1000,   seconds = floor( milliseconds ÷ 1000 )
Unit of the countDigits (present day)Where you see it
Seconds10Linux, databases, Python time.time()
Milliseconds13JavaScript Date.now(), many web APIs
Microseconds16High-resolution logging, some tracing

Fixed conversions worth knowing

IntervalSeconds
1 minute60
1 hour3,600
1 day86,400
1 week604,800
1 common year (365 days)31,536,000

Every day is treated as exactly 86,400 seconds. POSIX ignores leap seconds, so occasional UTC leap seconds have no separate representation in the count.

The 2038 limit on 32-bit systems

A signed 32-bit integer maxes out at 2,147,483,647 seconds. Once a system that stores time this way passes that point, the value overflows and wraps to a large negative number, throwing the clock back to 1901. The fix is a 64-bit integer, which pushes the range far beyond any practical concern.

  • 32-bit signed — runs out at 2,147,483,647 seconds, in early 2038.
  • 64-bit signed — covers roughly 292 billion years each way; effectively unbounded.

Common questions

What is a Unix timestamp?

It is the number of seconds that have passed since the Unix epoch, midnight UTC on 1 January 1970. Because it is a single count of seconds in UTC, it means the same instant everywhere, with no time zone attached.

Is my timestamp in seconds or milliseconds?

Count the digits. A present-day value in seconds is 10 digits; in milliseconds it is 13. JavaScript works in milliseconds, while most operating systems and databases use seconds. To convert, multiply seconds by 1000 or divide milliseconds by 1000.

Can a timestamp be negative?

Yes. Negative values count seconds before the epoch, so they represent moments before 1970. Minus 86400 is exactly one day before the epoch.

From the blog

Guides & how-tos

All articles →