Convert Unix timestamps to human-readable dates and back. Supports seconds and milliseconds, ISO 8601, RFC 2822, relative time, and code snippets.
Unix time (also called Epoch time or POSIX time) counts the seconds that have elapsed since January 1, 1970 00:00:00 UTC — a date known as the Unix Epoch. Nearly every computer system, database, API, and programming language uses Unix timestamps internally, making this the universal language of time in computing. Log files, JSON Web Tokens, database records, and HTTP cache headers all speak Unix time.
This converter translates between Unix timestamps and human-readable dates, supporting both seconds and milliseconds (JavaScript's Date.now() format). It outputs ISO 8601, RFC 2822, and relative time formats, shows a visual position on the 1970–2038 epoch timeline, and includes a notable-milestones table and code snippets for eight programming languages.
Whether you're debugging an API that returns epoch milliseconds, parsing log timestamps, setting cookie expiration, or preparing for the Y2038 problem (when signed 32-bit timestamps overflow), this tool gives you instant, multi-format conversion with developer context.
Every developer encounters Unix timestamps — in API responses, database columns, JWT expiry fields, and server logs. This tool converts instantly, shows both seconds and milliseconds, outputs copy-ready formats (ISO 8601 / RFC 2822), and includes code snippets for 8 languages. Keep these notes focused on your operational context. Tie the context to the calculator’s intended domain.
Unix timestamp = number of seconds since 1970-01-01 00:00:00 UTC Milliseconds = Unix seconds × 1000 Max 32-bit signed integer = 2,147,483,647 (2038-01-19 03:14:07 UTC) Date → Unix: Math.floor(Date.parse(dateString) / 1000) Unix → Date: new Date(unixSeconds * 1000)
Result: 2021-01-01T00:00:00Z
Timestamp 1,609,459,200 seconds since epoch equals midnight UTC on January 1, 2021 — the start of the year.
The signed 32-bit integer maximum is 2,147,483,647, which corresponds to 2038-01-19 03:14:07 UTC. After this moment, 32-bit systems that store time as a signed int32 will overflow — wrapping to −2,147,483,648, which represents December 13, 1901. This is analogous to the Y2K bug but affects embedded systems, IoT devices, and legacy databases.
Modern Linux kernels (5.6+), macOS, Windows, and 64-bit programming languages already use 64-bit timestamps. The risk is concentrated in embedded firmware, old databases, and file formats with fixed 32-bit fields (like some ext3 filesystems and certain NTP implementations).
| Format | Example | Usage | |---|---|---| | Unix seconds | 1609459200 | APIs, databases, JWT | | Unix milliseconds | 1609459200000 | JavaScript, Java | | ISO 8601 | 2021-01-01T00:00:00Z | JSON, XML, logs | | RFC 2822 | Fri, 01 Jan 2021 00:00:00 +0000 | Email, HTTP headers |
When an API returns a timestamp and you are unsure of the unit: if the number is around 1.7 billion, it is seconds; around 1.7 trillion, milliseconds; around 1.7 quadrillion, microseconds (used by PostgreSQL and some scientific systems). Timestamps near 0 might indicate a bug — many systems default to epoch when parsing fails.
Unix time counts seconds since January 1, 1970 00:00:00 UTC (the Unix Epoch). It ignores leap seconds and provides a simple linear count of time.
On January 19, 2038 at 03:14:07 UTC, a signed 32-bit integer will overflow (2,147,483,647). Systems using 32-bit time_t will wrap to negative values, interpreting time as 1901. Most modern systems use 64-bit timestamps.
Date.now() and Date.getTime() return milliseconds since epoch for sub-second precision. Divide by 1000 to get standard Unix seconds.
No. Unix time assumes every day has exactly 86,400 seconds. During a leap second, the Unix timestamp either repeats or smears the extra second — behavior varies by system.
Use INTEGER (Unix seconds) for simplicity and timezone neutrality, or TIMESTAMP/DATETIME for readability. Always store in UTC and convert to local time on display.
Timestamp 0 corresponds to 1970-01-01 00:00:00 UTC. Negative values represent dates before the epoch (e.g., -86400 = 1969-12-31).