Unix Timestamp Converter

Convert between Unix timestamps (epoch time) and human-readable dates.

1771025884
Timestamp → Date
Date → Timestamp

What Is a Unix Timestamp?

A Unix timestamp (also known as Epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970 00:00:00 UTC, known as the Unix Epoch. This system provides a simple, universal way to track time as a single integer value, independent of time zones or calendar systems.

Unix timestamps are used extensively in computing because they are easy to store, compare, and transmit. A single integer can represent any point in time, making it ideal for databases, APIs, log files, and system operations.

Key fact: The Unix timestamp is always in UTC (Coordinated Universal Time). When converting to a local date and time, you need to account for your time zone offset. Our converter displays results in UTC by default.

How Unix Timestamps Work

  1. Epoch reference point — All Unix time starts from January 1, 1970 at midnight UTC, defined as timestamp 0.
  2. Counting seconds — Each second that passes adds 1 to the timestamp. For example, timestamp 86400 represents January 2, 1970 (24 × 60 × 60 seconds).
  3. Negative timestamps — Dates before the Unix Epoch are represented as negative numbers. For example, -86400 represents December 31, 1969.
  4. Millisecond precision — Some systems use millisecond timestamps (13 digits instead of 10). Divide by 1000 to convert to standard seconds.

Common Uses of Unix Timestamps

  • Database storage — Storing dates as integers is efficient and avoids time zone conversion issues.
  • API responses — Many REST APIs return timestamps in Unix format for language-agnostic date handling.
  • Log files — System and application logs often use timestamps for precise event ordering.
  • JWT tokens — The iat (issued at), exp (expiration), and nbf (not before) claims use Unix timestamps.
  • Caching — Cache expiration times are commonly set using Unix timestamps.
  • File systems — File creation and modification times are stored as timestamps.

Year 2038 Problem: Systems using a 32-bit signed integer for Unix timestamps will overflow on January 19, 2038 at 03:14:07 UTC. Modern systems use 64-bit integers, which can represent dates billions of years into the future.

Frequently Asked Questions

What is the difference between Unix timestamp and ISO 8601?

Unix timestamp is a single integer (e.g., 1700000000). ISO 8601 is a human-readable format (e.g., 2023-11-14T22:13:20+00:00). Both represent the same point in time, but Unix timestamps are more compact and easier for computers to process.

Does Unix timestamp account for leap seconds?

No. Unix time does not account for leap seconds. Each day is treated as exactly 86,400 seconds. This means Unix time can differ from UTC by the number of leap seconds that have been inserted (currently about 27 seconds).

How do I get the current Unix timestamp in code?

Most languages have built-in support: Date.now()/1000 in JavaScript, time() in PHP, time.time() in Python, DateTimeOffset.UtcNow.ToUnixTimeSeconds() in C#.