How to Use This Tool
Paste the number. Every interpretation is shown at once, ranked by which is most likely given the digit count, so you can pick the one that lands where you expect.
Why digit count works
Each step up in precision multiplies the number by a thousand, which adds three digits. Since we are currently around 1.7 billion seconds since 1970, the eras are far enough apart that the length of the number is almost always decisive: ten digits is seconds, thirteen is milliseconds, sixteen is microseconds, nineteen is nanoseconds.
This rule holds for any date from roughly 2001 to 2286 in seconds, which covers essentially every timestamp you will meet in a running system. It breaks for dates far in the past — a 1970s timestamp in seconds has only nine digits or fewer — which is exactly when you should look at the source rather than the number.
Why you cannot just check whether the date is valid
This is the part people get wrong. A common approach is to try both and keep whichever gives a
sensible date. But 1000000000 is September 2001 as seconds and January 1970 as
milliseconds, and both are real dates that parse without error. Nothing throws. If your data happens to
contain old records, the wrong reading can look entirely reasonable and you will not notice.
The same problem appears in reverse: a millisecond timestamp read as seconds lands about fifty thousand years in the future, which is obviously wrong — so that direction is usually caught, and the other direction is not. Asymmetric failure modes are the ones that reach production.
Where each unit comes from
- Seconds — Unix
time(), most APIs, JWTexpandiatclaims, Postgresextract(epoch ...). - Milliseconds — JavaScript
Date.now(), JavaSystem.currentTimeMillis(), most JSON produced by those languages. - Microseconds — Python
datetimeinternals, some database timestamp columns, Chrome tracing. - Nanoseconds — Go's
UnixNano, Prometheus and other metrics systems, high-resolution profilers.
A mixed pipeline containing two of these is where the confusion usually starts. If you control the
format, storing seconds with an explicit unit in the field name — created_at_ms rather
than created_at — removes the guesswork permanently.
