Convert Unix timestamps to dates and dates to timestamps — seconds, milliseconds, microseconds or nanoseconds, in any time zone, right in your browser.
Used to display dates and to read the date you enter. Timestamps themselves are always UTC.
Seconds, milliseconds, microseconds or nanoseconds.
Pick a date and time in the zone above.
One timestamp per line — units are detected for each line. Up to 5,000 lines.
Click one to convert it above.
Copy-ready examples for the current time, timestamp → date and date → timestamp.
A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have passed since 1 January 1970, 00:00:00 UTC — the Unix epoch. Because it is a single number that does not depend on a time zone or calendar format, it is the standard way for databases, APIs, logs and programming languages to store and compare moments in time.
The timestamp 1696500000, for example, is 5 October 2023, 09:20:00 UTC. The same number means the same instant everywhere in the world; only the way it is displayed changes with the time zone.
Different systems count in different units. A quick guide by digit count for current dates:
10 digits — seconds (Unix, PHP, Python time.time(), MySQL). 13 digits — milliseconds (JavaScript Date.now(), Java, many REST APIs). 16 digits — microseconds (some databases and Python datetime). 19 digits — nanoseconds (Go, high-resolution logs, tracing systems).
This converter detects the unit automatically from the digit count, and lets you force a unit when a value is ambiguous.
Older systems store the timestamp as a signed 32-bit integer, whose largest value is 2147483647 — 19 January 2038, 03:14:07 UTC. One second later the value overflows and wraps to a date in 1901. Modern systems use 64-bit integers, which last for roughly 292 billion years, but embedded devices, old databases and file formats can still be affected. You can check these boundary values in the Common timestamps section.
Paste the timestamp into the Timestamp → Date box. The tool shows the date and time in your chosen time zone and in UTC. In code, multiply seconds by 1000 and pass the result to new Date() in JavaScript, or use datetime.fromtimestamp() in Python. The language examples at the bottom of this page cover the most common cases.
Count the digits. Today’s timestamps in seconds have 10 digits, in milliseconds 13 digits, in microseconds 16 and in nanoseconds 19. If a date comes out in 1970 or in the year 50,000, the unit is probably wrong — switch the unit buttons to compare.
No. A Unix timestamp always counts from the epoch in UTC, so the same number is the same instant everywhere. A time zone only matters when you turn the timestamp into a human-readable date, or when you turn a local date into a timestamp. That is why this tool has a time zone selector.
Yes. Negative values are moments before 1 January 1970. For example -86400 is 31 December 1969, 00:00:00 UTC. They work in this tool, and in most modern languages.
Unix time ignores leap seconds — every day is treated as exactly 86,400 seconds — and it is not affected by daylight saving, because it is always UTC. DST only affects the local date you see. When clocks go back, a local time such as 1:30 AM happens twice and is ambiguous; when they go forward, some local times do not exist. This tool warns you in both cases when you enter a local date.
The live clock at the top of this page shows it in seconds and milliseconds. In code: Math.floor(Date.now()/1000) in JavaScript, int(time.time()) in Python, time() in PHP, date +%s in a Linux or macOS shell, and SELECT UNIX_TIMESTAMP() in MySQL.
It depends on the system. JavaScript dates go up to about the year 275,760 (±8.64 × 1015 milliseconds). A signed 32-bit timestamp ends in January 2038 and an unsigned one in February 2106. This tool accepts any value JavaScript can represent and shows time-zone conversions for years 1583–9999.
No. All conversions happen in your browser using standard JavaScript. Nothing you type is uploaded or stored.