Unix Timestamp Converter
Convert a Unix timestamp to a date and back. Seconds, milliseconds and microseconds are detected automatically.
Conversion runs in your browser; nothing is sent anywhere.
What is a Unix timestamp?
It is the number of seconds since 1 January 1970 00:00:00 UTC (the Unix epoch). It does not depend on time zones: the same moment has the same number in Istanbul and in Tokyo, and the zone only matters when you turn it into a clock time. Server logs, databases and APIs often store time this way.
Seconds or milliseconds?
10 digits is seconds (Linux, PHP time(), MySQL UNIX_TIMESTAMP()). 13 digits is milliseconds (JavaScript Date.now(), Java). 16 digits is microseconds and 19 digits nanoseconds (Go UnixNano(), Python time.time_ns()). The tool picks the unit from the number of digits; if it guesses wrong, choose the unit yourself.
On the command line and in code
On Linux date +%s prints the current timestamp and date -d @1792137600 turns one into a date (on macOS date -r 1792137600). In PHP use date('Y-m-d H:i:s', $ts), in JavaScript new Date(ts * 1000), in Python datetime.fromtimestamp(ts, tz=timezone.utc) and in MySQL FROM_UNIXTIME(ts).
Istanbul time
Turkey has not used daylight saving time since 2016; it is UTC+3 all year. If a server log shows UTC, add 3 hours. timedatectl shows which zone your server runs on.
More free tools
FAQ
About Unix Timestamp Converter
Systems that keep the timestamp in a signed 32-bit integer can count only up to 2147483647, which is 19 January 2038 03:14:07 UTC; one second later the number overflows and the date wraps to 1901. 64-bit Linux and current languages are not affected. The risk is in old embedded devices and 32-bit fields; MySQL's TIMESTAMP column, for example, is still limited to that date, so use DATETIME for far-off dates.
No. A timestamp is always counted from UTC, so the same moment is the same number everywhere. Only the clock time it is shown as changes, which is why the tool shows the same value in UTC, Istanbul time and your local time side by side.
Yes, dates before 1970 are negative: -86400 is 31 December 1969. The tool converts negative and fractional values as well. Some older systems and unsigned 32-bit fields do not accept negative values.