Unix Timestamp Converter

Convert Unix timestamps to ISO 8601, UTC, and local time zones.

Data
Unix Timestamp
Human-Readable Date

What is a Unix timestamp?

A Unix timestamp (also called an epoch timestamp or POSIX time) is a number representing the total number of seconds that have elapsed since the Unix Epoch — midnight on 1 January 1970 (UTC). It is a standardised, timezone-independent way to represent a moment in time that is widely used in databases, APIs, log files, and programming.

Unix timestamps are timezone-independent because they are always measured from the same fixed point in UTC. Converting a Unix timestamp to a human-readable date requires knowing the target timezone — the same timestamp produces different local times in Tokyo and New York. This is why storing timestamps in a database as Unix integers and converting to local time in the application layer (or the user's browser) is a robust pattern for international applications.

JavaScript's Date.now() returns milliseconds since the epoch (a Unix timestamp × 1000). PHP's time() returns seconds. Most databases store timestamps in seconds unless specified otherwise. The 32-bit timestamp overflow — called the "Year 2038 problem" — occurs when a signed 32-bit integer can no longer represent the current time, which will happen on 19 January 2038 at 03:14:07 UTC. Modern systems use 64-bit integers, which will not overflow for billions of years.

Common mistakes

  • Seconds vs milliseconds — JavaScript uses milliseconds (13-digit timestamps around 1.7 trillion), while most Unix tools and databases use seconds (10-digit timestamps around 1.7 billion). Dividing a millisecond timestamp by 1000 gives the second timestamp.
  • Timezone confusion — A Unix timestamp is always UTC. Converting to local time requires knowing the offset. The same timestamp can display as different dates in different timezones — for example, a timestamp at 11pm UTC on 31 December is already 1 January in timezones east of UTC.