You are looking at a number: 1700000000, or maybe 1700000000000. The two differ by three digits and by a factor of a thousand, and they need completely different readings. Read the first as milliseconds and you land in January 1970. Read the second as seconds and you land tens of thousands of years in the future. Nothing about either number announces which one it is.

The fastest clue is the length. This guide explains the digit test, how a converter automates it with a threshold of 1 trillion, and the one case, old millisecond data, where the test fails and you have to override it. The Unix Timestamp Converter applies the test for you and shows which unit it used.

Contents

  • Quick answer
  • The digit test
  • How auto-detection draws the line at 1 trillion
  • The pre-2001 millisecond trap
  • What the wrong unit does to a date
  • Reading a timestamp step by step
  • Worked example: two numbers, one moment
  • Limitations
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Count the digits. Current timestamps in seconds have 10 digits; current timestamps in milliseconds have 13. A converter automates the same judgement: it auto-detects the unit, treating values of 1 trillion or more as milliseconds and smaller values as seconds, and shows which unit it used. The one exception is old data: a millisecond value from before 2001 is smaller than 1 trillion, so auto-detection can misread it as seconds. For values like that, force the unit with the selector in the Unix Timestamp Converter.

The digit test

A Unix timestamp counts the time since the epoch, midnight at the start of 1 January 1970 in UTC. The classic count runs in seconds. Many environments count milliseconds instead, for finer resolution, and a millisecond count of the same moment is the seconds count multiplied by a thousand: three extra digits of precision at the end.

That thousand-fold gap is what makes the length test work. The seconds count for the present day sits in the billions, which is 10 digits. The milliseconds count for the same moment sits in the trillions, which is 13 digits. The two families do not overlap anywhere near the present, so a glance at the length tells you the unit with confidence: 10 digits, seconds; 13 digits, milliseconds. The converter's own FAQ gives the same rule of thumb: if your number has 13 digits, it is almost certainly milliseconds.

How auto-detection draws the line at 1 trillion

Auto-detection turns the digit test into a single comparison. Values of 1 trillion or more are treated as milliseconds; smaller values are treated as seconds. One trillion is a 1 followed by twelve zeros, the smallest 13-digit number, so the threshold is exactly the boundary the digit test draws.

The line works because both families sit far from it right now. A seconds value would need to grow a thousand-fold before it reached the threshold, and a current milliseconds value is already comfortably above it. There is no crowded border zone where real values of both kinds mix. Just as important, the converter shows which unit it used, so the detection is never a silent guess: you can see the reading, and if the date looks wrong, you know the first thing to check.

The pre-2001 millisecond trap

The threshold has a history problem. The millisecond count only crossed 1 trillion in September 2001, when the seconds count reached 1 billion. Every millisecond timestamp from before that moment is a 12-digit number below the line, and length-based detection reads it as seconds. The date that comes out is wrong by the usual factor of a thousand.

The converter's notes flag exactly this case: a millisecond value from before 2001 could be misread, so use the unit selector when it matters. In practice it matters for archived material: old log exports, migrated database rows, timestamps copied out of retired systems. Modern values are safe on auto-detect. For anything you suspect predates 2001 in millisecond form, force milliseconds and compare the result; a sensible date confirms the choice.

What the wrong unit does to a date

The failure is dramatic, which is good news: it is hard to miss. Take the converter's example moment, 1700000000 in seconds, Tuesday, 14 November 2023 at 22:13:20 UTC. Its millisecond form is 1700000000000.

Read that millisecond value as seconds and the date lands roughly 54,000 years in the future. Read the seconds value as milliseconds and it collapses to within weeks of the epoch: 20 January 1970. Neither result is subtle, and neither is a near miss you might accept by accident. When a conversion produces a date in the far future or in the first month of 1970, the unit is the first suspect, ahead of the value itself.

Reading a timestamp step by step

  1. Paste the timestamp into the Unix Timestamp Converter, or press Use current time to see a fresh one.
  2. Leave the unit on Auto-detect, or force seconds or milliseconds if you know which you have, or if the value is old millisecond data.
  3. Read the UTC, ISO and local conversions and the relative description, and note the unit the converter reports using.
  4. If the date looks absurd, switch the forced unit and compare. The sensible reading is the right one.

Worked example: two numbers, one moment

Paste 1700000000. The value is below 1 trillion, so auto-detection reads seconds, and the result is Tuesday, 14 November 2023 at 22:13:20 UTC, ISO form 2023-11-14T22:13:20.000Z.

Now paste 1700000000000. The value is above 1 trillion, so auto-detection reads milliseconds, and the result is the same Tuesday, the same time, the same ISO line. Two numbers, a thousand-fold apart, one moment. That agreement is the check the digit test promises: when both forms of a moment convert to the same date under auto-detection, the units were read correctly.

Limitations

The digit test is a rule about where the counts sit now, not a law of the format. A bare number carries no unit label, so if the system that produced your value documents its unit, that documentation beats digit counting. Auto-detection is a threshold heuristic with one known blind spot, pre-2001 millisecond values, and the converter is explicit about it rather than silent. The range is also finite: values beyond what JavaScript dates support, about 275,000 years either way, are reported as errors. And a correct unit still leaves the display question open: the local line applies your device's time zone, so compare UTC readings when two people need common ground.

Common mistakes

  • Assuming a 13-digit number is seconds. Thirteen digits is the signature of milliseconds. Reading it as seconds throws the date tens of thousands of years forward.
  • Trusting auto-detect on archived data. Pre-2001 millisecond values fall below the threshold. Force the unit for old exports and migrated rows.
  • Ignoring the reported unit. The converter shows which unit it used. If the date looks wrong, that line tells you what it assumed.
  • Blaming the value when the date is absurd. A date in the far future or in January 1970 is almost always a unit error, not bad data.

FAQs

How can I tell if a timestamp is seconds or milliseconds? Current timestamps in seconds have 10 digits; in milliseconds they have 13. If your number has 13 digits it is almost certainly milliseconds. The converter auto-detects this and shows which unit it used.

How does auto-detection decide which unit I have? By size. Values of 1 trillion or more are treated as milliseconds and smaller values as seconds, and the converter shows which unit it used so you can check the reading.

Why did my old millisecond timestamp convert to a wrong date? Millisecond values from before 2001 are smaller than 1 trillion, so auto-detection can read them as seconds. Force milliseconds with the unit selector when the value matters.

What happens if the wrong unit is used? The date lands somewhere absurd. A millisecond value read as seconds lands tens of thousands of years in the future; a seconds value read as milliseconds collapses to January 1970. An absurd date almost always means the unit is wrong.

Can I set the unit myself instead of auto-detect? Yes. Leave the unit on Auto-detect, or force seconds or milliseconds with the unit selector if you know which one you have.

Conclusion

Reading a timestamp starts with counting: 10 digits is seconds, 13 is milliseconds, and the 1 trillion threshold is that same test written as a number. Auto-detection handles every current value correctly, and the one historical exception, millisecond data from before 2001, has a manual override. For the story behind the count itself, Epoch Time Explained covers why the count starts in 1970 and why a number beat the date string. The Developer Tools archive collects the other formats and encodings you will meet alongside timestamps.