This tool takes a duration in milliseconds — the kind you get from a log line, a performance benchmark, or a Date.now() subtraction — and breaks it down into days, hours, minutes, seconds and milliseconds, plus a tidy HH:MM:SS.mmm clock string. It is aimed at developers reading timing data and anyone making sense of a raw millisecond count.
How it works
The tool divides the total milliseconds down through each time unit, carrying remainders:
- milliseconds = total mod 1000
- seconds = (total ÷ 1000) mod 60
- minutes = (total ÷ 60000) mod 60
- hours = (total ÷ 3,600,000) mod 24
- days = total ÷ 86,400,000
Each component uses integer division and remainder, so durations longer than a day roll up cleanly into days. A human-readable summary like “1d 1h 1m 1s 500ms” appears for quick reading.
Example
A benchmark reports 3,725,500 ms.
That is 0 days, 1 hour, 2 minutes, 5 seconds, 500 ms — shown as 01:02:05.500 and “1h 2m 5s 500ms”.
| Milliseconds | Breakdown |
|---|---|
| 5000 | 5s |
| 90000 | 1m 30s |
| 3,600,000 | 1h |
| 90,061,500 | 1d 1h 1m 1s 500ms |
All calculation happens in your browser; nothing is uploaded.