Skip to main content

Unix Timestamp Converter

Convert Unix epoch timestamps to human-readable dates and back. Supports seconds and milliseconds.

Current Unix Time

About Unix Timestamps

A Unix timestamp (also called POSIX time or epoch time) counts the number of seconds elapsed since midnight UTC on January 1, 1970. This reference point, known as the Unix epoch, was chosen when Ken Thompson and Dennis Ritchie designed the time system for the original Unix operating system at Bell Labs. The 32-bit signed integer used to store timestamps on early systems can represent dates from December 13, 1901 to January 19, 2038, when the counter overflows. This is the Y2K38 problem, and most modern systems have moved to 64-bit timestamps to avoid it.

Timestamps appear throughout software development: database records, API responses, log files, JWT tokens, HTTP headers, and build systems. Seconds-precision timestamps are the most common, but JavaScript's Date.now() and many APIs return millisecond-precision values (13 digits instead of 10). This converter auto-detects the format based on magnitude.

This tool converts bidirectionally between Unix timestamps and human-readable dates. Enter a timestamp or pick a date, and the other updates instantly. The current Unix time is shown live for reference.

Frequently Asked Questions

What is a Unix timestamp (epoch time)?

A Unix timestamp is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC, a moment known as the Unix epoch. It provides a single integer representation of any point in time, making it the standard way to store and transmit time in databases, APIs, log files, and programming languages.

What is the Year 2038 problem (Y2K38)?

The Y2K38 problem occurs because many older systems store Unix timestamps as a signed 32-bit integer, which can hold a maximum value of 2,147,483,647. That number corresponds to January 19, 2038 at 03:14:07 UTC. After that second, the counter overflows and wraps to a negative number, representing a date in December 1901. Most modern systems now use 64-bit timestamps, which will not overflow for another 292 billion years.

How can I tell if a timestamp is in seconds or milliseconds?

Count the digits. A seconds-precision Unix timestamp for dates between 2001 and 2286 has 10 digits (e.g., 1700000000). A milliseconds-precision timestamp for the same range has 13 digits (e.g., 1700000000000). JavaScript's Date.now() returns milliseconds, while most Unix command-line tools and many APIs use seconds. This converter auto-detects the format based on magnitude.

Do Unix timestamps account for leap seconds?

No. Unix time deliberately ignores leap seconds. The POSIX standard defines each day as exactly 86,400 seconds. When a leap second is inserted (as happened 27 times between 1972 and 2016), Unix clocks either repeat a second, slew the clock gradually, or step backward, depending on the system's NTP implementation. This means Unix timestamps are not a perfectly continuous count of SI seconds, but the simplification makes arithmetic on dates vastly easier.

What does a negative Unix timestamp mean?

A negative Unix timestamp represents a date before the Unix epoch (January 1, 1970). For example, -86400 corresponds to December 31, 1969. Negative timestamps are valid and commonly used to represent historical dates in databases and programming. The earliest date a signed 32-bit timestamp can represent is December 13, 1901 (-2,147,483,648 seconds before epoch).