A Unix timestamp is a single number that represents a moment in time. You will see them in APIs, databases, log files and JWTs. This guide explains what the number means and the gotchas that trip people up.
The epoch
A Unix timestamp counts the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970 — a moment called the 'Unix epoch'. So 0 is that exact instant, and 1000000000 is 9 September 2001. Convert any value with our Unix timestamp converter.
Seconds vs milliseconds
This causes endless bugs. Unix time is traditionally in seconds (a 10-digit number today), but JavaScript's Date.now() returns milliseconds (13 digits). If a date looks like it is in 1970 or 50,000 years in the future, you have almost certainly mixed up the two. Our converter auto-detects seconds, milliseconds, microseconds and nanoseconds for you.
The Year 2038 problem
Older systems store Unix time in a signed 32-bit integer, which can only count up to 2,147,483,647 seconds — a value reached at 03:14:07 UTC on 19 January 2038. After that the counter overflows. Modern 64-bit systems push this billions of years into the future, but legacy code is still being updated.
Working with dates
Once you understand timestamps, date maths is easy. Add or subtract intervals with the date add/subtract tool, measure the gap between two dates with the date difference calculator, or generate dynamic Discord timestamps for chat.