All tools

Duration Converter

Convert freely between "1h 30m", "01:30:00", and seconds.

  • duration
  • seconds
  • hours
  • minutes
  • hh mm ss
  • parse

About Duration Converter

Durations get written down in different formats depending on the context. Video editors and runners use clock notation like 01:30:00. Programmers and YAML configs use ISO-style "1h 30m". Logs and APIs use raw seconds. Anytime you need to move a duration between those formats, you're doing the same arithmetic — and getting it wrong is easy when minutes look like seconds and hours look like fractional days.

This converter holds a single canonical duration in milliseconds and shows it three ways at once: free-form ("1h 30m 5s"), clock notation ("01:30:05"), and seconds. Edit any field and the other two update instantly. Below that, a breakdown panel splits the duration into weeks, days, hours, minutes, seconds, and milliseconds, and a totals panel shows the same duration expressed entirely in each of those units.

How to use

Type into whichever input matches the format you're starting from. The "Free form" field accepts things like "1h 30m", "90s", "1.5h", or any combination. The "Clock notation" field accepts hh:mm:ss or mm:ss. The "Seconds" field takes a plain number, including decimals.

The breakdown section below the inputs splits the value into weeks, days, hours, minutes, seconds, and milliseconds for quick reading. The "Total in each unit" section is for when you need the same duration expressed entirely in one unit — useful when filling in a config that wants minutes, or a script that wants seconds. Every row has a copy button beside it.

Frequently asked questions

  • What free-form formats does the converter accept?

    Combinations of value-and-unit pairs like "1h 30m", "2d 4h 15m", "90s", "1.5h", and "500ms". The accepted units are w (weeks), d (days), h (hours), m (minutes), s (seconds), and ms (milliseconds). Units can appear in any order and whitespace is optional.

  • How does the "Clock notation" field parse input?

    It treats values as hours:minutes:seconds if there are three components and minutes:seconds if there are two. So "01:30:00" is one hour thirty minutes; "30:45" is thirty minutes forty-five seconds, not thirty hours.

  • Does the difference between "Breakdown" and "Total in each unit" matter?

    Yes. "Breakdown" splits the duration into the largest meaningful chunks (e.g. "1d 2h 30m"); the totals panel shows the same duration expressed entirely in one unit (e.g. "1.104 days", "26.5 hours", "1,590 minutes"). Configs and scripts usually want the totals form; humans usually want the breakdown.

  • Why are tiny values shown as 0.000000123 instead of scientific notation?

    Because plain fixed-point numbers are easier to copy into configs and shell scripts than 1.23e-7. The converter uses significant-digit precision for very small values to keep them readable without resorting to scientific notation.

More Time & Dates tools