Duration → Milliseconds Parser
“1h 30m” to ms, seconds, and minutes.
Free, no sign-upRuns in your browser — nothing is uploadedUpdated
Timeouts want milliseconds; humans write “90 seconds” or “1h 30m”. Type a duration in any common form and get it as milliseconds, seconds, and minutes, ready to paste into a config or a setTimeout call.
Common durations in milliseconds
| Duration | Milliseconds | Seconds |
|---|---|---|
| 1 second | 1,000 | 1 |
| 30 seconds | 30,000 | 30 |
| 1 minute | 60,000 | 60 |
| 5 minutes | 300,000 | 300 |
| 15 minutes | 900,000 | 900 |
| 30 minutes | 1,800,000 | 1,800 |
| 1 hour | 3,600,000 | 3,600 |
| 12 hours | 43,200,000 | 43,200 |
| 1 day | 86,400,000 | 86,400 |
| 1 week | 604,800,000 | 604,800 |
Milliseconds conversion formulas
1 second = 1,000 ms, 1 minute = 60,000 ms, 1 hour = 3,600,000 ms and 1 day = 86,400,000 ms. To convert, multiply each part of the duration by its factor and add: 1h 30m is 3,600,000 + 30 × 60,000 = 5,400,000 ms.
Writing durations in code
Milliseconds are the native unit of JavaScript timers (setTimeout, setInterval), Date arithmetic, and many HTTP client timeouts. Hard-coded values like 5400000 are easy to get wrong by a factor of ten, so many codebases spell them out as 90 * 60 * 1000 — or paste the computed value from here with a comment.
Watch for unit mismatches between systems: Java's Thread.sleep and JavaScript use milliseconds, Python's time.sleep uses seconds, and Go's time.Duration counts nanoseconds.
How to use it
- 1.Type a duration: 1h 30m, 90s, 1:45:00, 2.5h…
- 2.Read the value in ms, seconds, and minutes.
- 3.Copy the one your code expects.
Questions people ask
- How many milliseconds in an hour?
- 3,600,000 ms — 60 minutes × 60 seconds × 1000. A day is 86,400,000 ms.
- What does a bare number mean?
- Bare numbers are read as seconds in this tool — type units (90m, 2h) or colon time when you mean something else.
- How many milliseconds are in a minute?
- 60,000 ms. 5 minutes is 300,000 ms and 15 minutes is 900,000 ms.