2026-08-07
Unix seconds vs milliseconds: how to tell them apart
10-digit vs 13-digit epochs, JWT exp claims, and fixing dates that look decades wrong. Convert locally with Jigglify.
Mixing Unix seconds and milliseconds is the classic epoch bug. Both count time since 1970-01-01T00:00:00Z, but they differ by a factor of 1,000 - enough to land your converted date in 1970 or decades in the future.
How to tell them apart
- Seconds: typically 10 digits today (for example
1710000000). - Milliseconds: typically 13 digits (for example
1710000000000).
Jigglify's Timestamp to Date view treats values with absolute magnitude around 1e11 or larger as milliseconds, and smaller numbers as seconds. Fractional seconds (for example 1710000000.5) are supported on the seconds path.
Where each unit appears
- Seconds: many REST APIs, JWT
exp/iat, classic Unix tools - Milliseconds:
Date.now(), browser APIs, some analytics and Java ecosystems
Symptoms of a mix-up
- Seconds interpreted as ms → dates near January 1970
- Milliseconds interpreted as seconds → dates far in the future
- JWT expiry that looks "already expired" or "never expires" vs wall clock
How to convert safely
- Count digits (or check your API docs) before converting.
- Paste into the timestamp converter and confirm the year looks sane.
- When writing code, multiply seconds by 1,000 for JS
Date, or divideDate.now()by 1,000 for JWT-style seconds.
Check seconds vs milliseconds instantly - convert epoch time locally and free.
Open the free timestamp converter →
Related: What is a Unix timestamp? · How to convert a Unix timestamp