Convert between Unix timestamps and human-readable dates -- free, private, in your browser
Read more: Unix Timestamp Converter
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.
| Language | Get current timestamp | Unit |
|---|---|---|
| JavaScript | Date.now() | milliseconds |
| Python | time.time() | seconds (float) |
| PHP | time() | seconds |
| Java | System.currentTimeMillis() / 1000 | seconds |
| C# | DateTimeOffset.UtcNow.ToUnixTimeSeconds() | seconds |
| Ruby | Time.now.to_i | seconds |
| Go | time.Now().Unix() | seconds |
| SQL (MySQL) | UNIX_TIMESTAMP() | seconds |
| Bash | date +%s | seconds |
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.
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.
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.
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.
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.