You are reading a log file, an API response or a database row, and where a date should be there is a bare number: 1700000000. Nothing about it says which day it was, whether it was morning or night, or whether the number counts seconds or something smaller. Converting it by hand means counting from 1970 and doing calendar arithmetic nobody should do unaided.

This guide shows how to turn that number into a readable date with the free Unix Timestamp Converter on Ovatly, how to avoid the seconds versus milliseconds trap that produces absurd results, and how to run the conversion in the other direction when you have a date and need its timestamp.

Contents

  • Quick answer
  • What the result lines mean
  • The seconds versus milliseconds trap
  • How to convert a timestamp, step by step
  • Worked example: the timestamp 1700000000
  • Converting a date back into a timestamp
  • Limitations
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Paste the timestamp into the Unix Timestamp Converter and read the conversions. Leave the unit on Auto-detect unless you know which unit you have: current timestamps in seconds have 10 digits, in milliseconds 13, and the converter detects the unit from the value and shows which one it used. The result gives you the moment in UTC, in ISO 8601 form and in your local time together, plus a plain relative description such as "3 days ago". To go the other way, pick a date and time in the lower half of the tool and read its timestamp.

What the result lines mean

A timestamp names one single moment, but that moment is displayed differently depending on the frame you use, and the converter shows you the main frames side by side so you can pick the one your task needs.

The UTC line shows the moment in Coordinated Universal Time, the shared reference every zone is offset from. The ISO 8601 line shows the same moment in the standard machine-readable format you will meet in API responses and data files. Both are zone-free: they describe the moment itself, not anybody's wall clock. The local line applies your device's time zone, so its hour can differ from the UTC hour. That is not an error; the moment is identical, only its display changes with time zone.

The relative description translates the moment into everyday terms, such as "3 days ago". It is the fastest sanity check in the result: if you converted a value from a log written this morning and the description talks about years, something about the value is off, and the usual suspect is the unit.

The seconds versus milliseconds trap

Timestamps come in two common units. A Unix timestamp properly counts seconds since the epoch, and a current one has 10 digits. Many systems, JavaScript among them, work in milliseconds instead, and a current millisecond value has 13 digits. The two look alike at a glance, and feeding one where the other is expected throws the result off by a factor of a thousand: a date thousands of years away, or one squashed implausibly close to 1970.

The converter auto-detects the unit. Its rule is simple: values of 1 trillion or more are treated as milliseconds, and smaller values as seconds, which correctly sorts every current 10-digit and 13-digit value. It also shows which unit it used, so you can confirm the reading rather than trust it blindly. When you already know the unit, you can force seconds or milliseconds with the unit selector instead.

One edge case deserves care. A millisecond value from before 2001 is smaller than 1 trillion, so auto-detection could read it as seconds and produce a date far in the future. Old millisecond data is exactly where the manual unit selector earns its place.

How to convert a timestamp, step by step

  1. Open the Unix Timestamp Converter. To see where "now" falls, press Use current time and the current timestamp fills in.
  2. Paste your timestamp into the field.
  3. Leave the unit on Auto-detect, or force seconds or milliseconds if you know which you have.
  4. Read the result: the UTC, ISO and local conversions, the relative description, and the unit the converter used.
  5. Check the result against what you expected. If the date is wildly wrong, the unit is the first thing to question; switch the selector and read again.

Worked example: the timestamp 1700000000

The converter's own example uses a well-known round number. Paste in 1700000000 and the converter reports Tuesday, 14 November 2023 at 22:13:20 UTC, with the ISO form 2023-11-14T22:13:20.000Z. Your local line will show the same moment shifted by your device's time zone offset, which is expected behaviour, not a discrepancy.

The same moment written in milliseconds is 1700000000000. Paste that instead and the converter detects from its length that the value is in milliseconds and returns the same date. That pair is the cleanest demonstration of the trap and the fix: thirteen digits or ten, the moment is one, and the converter's job is to work out which count you handed it.

Converting a date back into a timestamp

The tool also runs in reverse, which is what you need when you are building a query, seeding test data or checking what a system should have stored. Pick a date and time in the lower half of the converter and it shows you the timestamp for that moment.

One detail matters: the date-to-timestamp direction interprets the picked time in your local time zone, and the result says so. If you pick 09:00 expecting UTC but your device is set elsewhere, the timestamp you get back is for 09:00 on your own wall clock. Neither answer is wrong, but they are different moments, so check which frame you need before using the number.

Limitations

Auto-detection is a length rule, not mind reading. It handles current values reliably, but a millisecond value from before 2001 can fall under the threshold and be misread as seconds, so force the unit for old data. Values beyond the range JavaScript dates support, about 275,000 years either way, are reported as errors rather than converted, which makes the error a useful signal that a value was never a timestamp. And the converter shows the moment in UTC, ISO form and your device's local zone; rendering it in some other specific zone is a separate step.

Common mistakes

  • Assuming every timestamp is in seconds. Thirteen digits means milliseconds. Reading a millisecond value as seconds throws the date thousands of years out.
  • Trusting auto-detect on old data. A pre-2001 millisecond value sits below the detection threshold. Force the unit when the data is old or the stakes are high.
  • Treating the local line as an error. A different hour on the local line is your time zone doing its job. The UTC and ISO lines are the zone-free record of the moment.
  • Forgetting the reverse direction uses your zone. A date picked in the lower half is read in your local time zone. If you needed UTC, account for the offset before using the number.
  • Skipping the relative description. It is the quickest check you have. If it disagrees with when the event supposedly happened, stop and re-examine the value.

FAQs

Is this seconds or milliseconds? How can I tell? 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, and you can force seconds or milliseconds with the unit selector when you already know.

Why does the same timestamp show a different hour for me? The moment is identical; only its display changes with time zone. UTC and ISO values are zone-free, while the local line applies your device's zone, so the local hour can differ from the UTC hour for the same timestamp.

What does the relative description in the result mean? Alongside the UTC, ISO and local conversions, the converter adds a plain relative description of the moment, such as 3 days ago. It is a quick sense check: if the timestamp was supposed to be recent and the description says years, the value is probably in the wrong unit.

Can I convert a date back into a timestamp? Yes. Pick a date and time in the lower half of the converter and read its timestamp. That direction interprets the picked time in your local time zone, and the result says so, so allow for the zone if you expected a UTC-based figure.

Why did the converter report an error instead of a date? Values beyond the range JavaScript dates support, about 275,000 years either way, are reported as errors rather than converted. An error usually means the value was not a real timestamp, or was in a unit that pushed it far outside any plausible date.

Conclusion

Converting a timestamp is a ten-second job once you know the two things that go wrong: the unit, and the time zone frame you are reading in. The Unix Timestamp Converter handles both openly, showing the unit it detected and the UTC, ISO and local readings side by side. If you want the background on what these numbers actually count and why systems store them, read the companion explainer, What Is a Unix Timestamp, and browse the rest of the Developer Tools guides for the other formats you will meet in logs and APIs.