What is a Unix timestamp?
A Unix timestamp is the number of seconds since 1 January 1970 00:00:00 UTC. It does not depend on time zones: the same moment has the same timestamp in Taipei and in London, and only the local display differs. Databases, APIs and logs use it to record time.
How to use
- Paste a timestamp under "Timestamp → date and time". The date, ISO 8601, UTC, weekday and relative time appear right away.
- Type a date under "Date and time → timestamp" to get seconds, milliseconds, microseconds and nanoseconds.
- Use "Time zone" at the top to choose the zone for display and conversion. It defaults to your computer's time zone.
Seconds, milliseconds, microseconds or nanoseconds?
The unit is detected from the number of digits: a current timestamp has 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. JavaScript Date.now() and Java System.currentTimeMillis() return milliseconds; PHP time() and Python int(time.time()) return seconds. If the guess is wrong, choose the unit by hand.
Example
The timestamp 1700000000 (seconds) in Taipei (UTC+8) is:
2023-11-15T06:13:20+08:00
In UTC it is:
2023-11-14T22:13:20Z
FAQ
Why is my result off by several hours?
A timestamp is always UTC. If a program shows it as UTC, local time looks hours behind; if local time is converted as if it were UTC, the timestamp is hours ahead. Check the selected time zone, or add +08:00 or Z after the date.
Are nanoseconds kept exactly?
Yes. JavaScript numbers are only exact to about 16 digits, so a 19-digit nanosecond timestamp would normally change. This tool uses big integers and keeps every digit.
Can I enter dates before 1970?
Yes. Timestamps before 1970 are negative; for example -86400 is 1969-12-31 00:00:00 UTC.
What is the year 2038 problem?
Systems that store seconds in a signed 32-bit integer can only reach 2147483647, which is 2038-01-19 03:14:07 UTC; after that the value overflows to a negative number. Using 64-bit integers or milliseconds avoids it.