Learn · Guide
How to Read a Unix Timestamp
Seconds versus milliseconds, timezones, and the mental math that makes epoch values readable.
What a timestamp actually is
A Unix timestamp is the number of seconds elapsed since 1970-01-01 00:00:00 UTC — the "epoch". It is timezone-agnostic: the same instant has the same timestamp everywhere on Earth. Timezones only matter when you display it.
Seconds or milliseconds?
The most common confusion is the unit.
- 10 digits (e.g.
1725931234) — seconds. This is the classic Unix timestamp. - 13 digits (e.g.
1725931234000) — milliseconds. JavaScript'sDate.now()and many APIs return this.
Rule of thumb: if the number is around 1.7 billion it is seconds; around 1.7 trillion it is milliseconds. Multiply/divide by 1000 to convert.
Converting in your head
For a rough estimate, remember the current epoch to two digits and the fact that a year is about 31.5 million seconds. For anything precise — or for dates in the past or future — use a converter instead of mental math; a single off-by-1000 error is the classic bug that breaks expiry checks by 50 years.
Timezones and display
When you convert a timestamp to a date, the instant is fixed but the clock reading depends on your timezone. ToolsKit's timestamp converter always renders in your browser's local timezone, and shows the UTC value for cross-team comparisons. For expiry logic, always compare timestamps (or UTC), never local wall-clock times.
Going the other way
To turn a date into a timestamp, compute (date - epoch). The built-in converter accepts a full ISO date (2026-09-09T12:00:00) and returns both seconds and milliseconds. Use milliseconds for JavaScript, seconds for most APIs and databases.
Where you will meet them
exp and iat in JWTs, OAuth token expiry, log timestamps, database created_at defaults, cache TTLs and cron job records all use epoch values. Being able to read them at a glance — and convert them exactly when it matters — saves real debugging time.