How to Read Unix Timestamps in Seconds and Milliseconds
A practical Unix timestamp guide for telling seconds from milliseconds, converting them into readable dates, and avoiding timezone mistakes in logs, APIs, and frontend code.
Related Tools
Open the matching tools
Start the workflow right away with the tools that fit this article best.
Why timestamp confusion is so common
Unix timestamps look simple because they are just numbers, but they create confusion fast when different systems use different units or display dates in different timezones.
A backend may return seconds, a browser may work in milliseconds, and logs may show UTC while your machine shows local time. The number is the same event, but the context changes how it appears.
How to tell seconds from milliseconds quickly
The fastest clue is the length of the number. Modern Unix timestamps in seconds usually have 10 digits, while Unix timestamps in milliseconds usually have 13 digits.
| Unit | Typical length | Example |
|---|---|---|
| Seconds | 10 digits | 1710403200 |
| Milliseconds | 13 digits | 1710403200000 |
How to convert a Unix timestamp into a readable date
A timestamp converter saves time because it shows multiple date formats at once instead of making you guess whether the number should be divided by 1000 first.
- Open Timestamp Converter in ToolBaseHub.
- Paste the timestamp, or leave the field empty if you want to inspect the current time.
- Choose whether the input should be treated as seconds or milliseconds.
- Run the conversion and compare the ISO, UTC, local, seconds, and milliseconds values.
- Copy the exact representation you need for logs, debugging, or documentation.
How to convert a local date into Unix seconds and milliseconds
Going the other direction is useful when you need to create expiration values, scheduled events, test payloads, or API parameters.
- Use the date-to-timestamp side of the tool.
- Pick the local date and time you want.
- Run the conversion.
- Copy the Unix seconds or Unix milliseconds value that matches the target system.
Common timestamp mistakes
- Treating milliseconds as seconds, which creates a date far in the future.
- Treating seconds as milliseconds, which creates a date near 1970.
- Comparing UTC output with local time output and assuming one of them is wrong.
- Forgetting that JavaScript Date values are usually based on milliseconds.
- Copying a timestamp from logs without checking which timezone the readable date used.
When using the current time is the fastest check
Sometimes you do not have a timestamp yet. You just want to know what the current Unix time is in seconds or milliseconds so you can paste it into a test or compare it with another system.
That is why ToolBaseHub lets you convert the current time immediately. It is a fast way to sanity-check logs, token expiry values, cron behavior, and frontend timestamps without leaving the browser.
FAQ
Frequently Asked Questions
What is the difference between Unix seconds and Unix milliseconds?
They represent the same type of time value, but at different precision. Seconds count whole seconds since the Unix epoch, while milliseconds add three extra digits for finer timing.
Why does a timestamp sometimes show the wrong year?
The most common reason is using the wrong unit. Seconds interpreted as milliseconds often look like 1970 dates, while milliseconds interpreted as seconds often produce dates far in the future.
Why do UTC and local time look different for the same timestamp?
Because they are two representations of the same moment in different timezones. The timestamp is not changing, only the human-readable display format is.
Does JavaScript usually use seconds or milliseconds?
JavaScript Date values usually work with milliseconds, which is why frontend code often needs to convert from 10-digit Unix seconds into 13-digit milliseconds first.
Can I use the tool without entering anything first?
Yes. ToolBaseHub can use the current time automatically, which is handy when you just need a quick reference value for testing or debugging.
Related Tools
Related Tools
Use these tools to finish the task covered in this article or continue with the next step in your workflow.