Unix Timestamp Converter

Convert between Unix timestamps and human-readable dates -- free, private, in your browser

Current Unix Timestamp
Timestamp to Date
--
Date to Timestamp
--

What Is a Unix Timestamp?

A Unix timestamp (also called Unix time, POSIX time, or epoch time) is the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC. This moment is called the Unix epoch. For example, the timestamp 1700000000 represents November 14, 2023, at 22:13:20 UTC.

Unix timestamps are used throughout computing because they are simple, unambiguous, and timezone-independent. A single integer represents an exact moment in time without the complexity of time zones, daylight saving, or date format variations. Most programming languages, databases, and APIs support Unix timestamps natively.

How to Convert Unix Timestamps

  1. To find the current timestamp, look at the live clock at the top of the page -- it updates every second
  2. To convert a timestamp to a human date, enter the number in the Timestamp to Date section and click Convert
  3. To convert a date to a timestamp, pick a date and time in the Date to Timestamp section and click Convert
  4. Toggle between seconds and milliseconds depending on what your system uses
  5. Toggle UTC if you need the conversion in Coordinated Universal Time rather than your local timezone

Unix Timestamp in Different Languages

LanguageGet current timestampUnit
JavaScriptDate.now()milliseconds
Pythontime.time()seconds (float)
PHPtime()seconds
JavaSystem.currentTimeMillis() / 1000seconds
C#DateTimeOffset.UtcNow.ToUnixTimeSeconds()seconds
RubyTime.now.to_iseconds
Gotime.Now().Unix()seconds
SQL (MySQL)UNIX_TIMESTAMP()seconds
Bashdate +%sseconds

The Year 2038 Problem

Systems that store Unix timestamps as signed 32-bit integers will overflow on January 19, 2038, at 03:14:07 UTC. At that moment, the integer reaches its maximum value of 2,147,483,647 and wraps to -2,147,483,648, which represents a date in December 1901.

Modern 64-bit systems are not affected -- a signed 64-bit integer can represent timestamps until approximately 292 billion years in the future. Most current operating systems, programming languages, and databases have already migrated to 64-bit time. The risk remains in embedded systems, legacy firmware, and older software that still uses 32-bit time_t.

Seconds vs Milliseconds

Unix timestamps are traditionally measured in seconds, but many modern systems use milliseconds. JavaScript's Date.now() returns milliseconds. Java's System.currentTimeMillis() returns milliseconds. Most other languages and Unix itself use seconds.

This is a common source of bugs: passing a seconds timestamp to a function expecting milliseconds gives you a date in January 1970. Passing milliseconds where seconds are expected gives you a date thousands of years in the future. If a timestamp has 10 digits, it is in seconds. If it has 13 digits, it is in milliseconds.

Frequently Asked Questions

Why does Unix time start in 1970?

The Unix operating system was created in the late 1960s and early 1970s. When the developers needed a reference point for timestamps, they chose January 1, 1970, as a round, recent date. There is no deep technical reason -- it was a pragmatic choice that became the universal standard.

What is epoch time?

Epoch time is another name for Unix time. The "epoch" is the starting point -- January 1, 1970, 00:00:00 UTC. Epoch time is the count of seconds since that moment. The terms "epoch time," "Unix time," "POSIX time," and "Unix timestamp" all refer to the same thing.

Do Unix timestamps account for leap seconds?

No. Unix time does not count leap seconds. A Unix day is always exactly 86,400 seconds. When a leap second is inserted, Unix time either repeats a second or smears the adjustment over a longer period, depending on the implementation. This means Unix timestamps are not precisely aligned with UTC at the sub-second level, but the difference is never more than a fraction of a second.