Seconds or Milliseconds? Count the Digits
By toolbelt maintainers ·
Updated
Ten digits is seconds, thirteen is milliseconds. Get it wrong and you are off by decades, not seconds.
What is this tool?
Unix time counts seconds since 1970. Many systems use milliseconds instead, and both look like ordinary integers.
How it works
Each line is read on its own. A numeric value is treated as seconds below thirteen digits and milliseconds above, unless you force a unit. Anything that is not numeric is parsed as a date and returned as the epoch value.
Example
1700000000 → 2023-11-14 22:13:20 UTC (seconds) 1700000000000 → 2023-11-14 22:13:20 UTC (milliseconds)
When to use it
Normalising a log export where services disagree. Checking a batch of values before an import. Converting a list of release dates for an API.
Optimization Tips
The digit rule is a heuristic. A timestamp for the year 2286 in seconds is also thirteen digits. Force the unit when the dates are historical or far future.
Frequently Asked Questions
Why did one value convert differently?
Can I paste dates too?
What about negative values?
Is the list uploaded?
Related tools
- UUID GeneratorGenerate cryptographically secure Version 4 (v4) UUIDs. Create batches of up to 100 unique identifiers at once, perfect for database primary keys or test data.
- Regex TesterTest regular expressions in real-time. See highlighted matches, named capture groups, exact character indexes, and test replacement strings with JavaScript flavors.
- Cron GeneratorExplain cron expressions in plain English and predict the next 5 run times. Validate syntax for Linux crontab or serverless schedulers before deploying jobs.
- Timestamp ConverterConvert Unix timestamps to human-readable dates and vice versa. Includes a live clock and automatically handles seconds or milliseconds for easy debugging.