Date & Time

Duration Converter and Formatter

Reads a duration in any of the four common notations and shows it in all of them.

Loading the tool…

Processing happens locally in your browser. What you paste or load is processed by this page and is not uploaded to a server. Nothing is stored unless you use a control that says it stores something, and you can clear anything this site has kept from the privacy page.

How to use this tool

  1. Paste your durations, one per line. Seconds, 1h 30m, 01:30:00 and PT1H30M are all read.
  2. Choose the wording you want for the Formatted column.
  3. Select Convert — all four notations are shown regardless, so you can copy whichever the target system wants.

What duration formatter does

Durations are written four ways and each system picks a different one. A monitoring tool emits 5400, a config file wants 1h 30m, a report wants 01:30:00 and an API schema wants PT1H30M. All four mean the same ninety minutes, and this page reads any of them and prints all of them side by side so a value can be moved between systems without arithmetic.

Paste a whole column of timings and every line is converted at once. That is the common case — a set of job runtimes or response times out of a log, where the useful step is not converting one value but seeing the whole set in a form a person can read.

Frequently asked questions

Four. Plain seconds, human wording such as "1h 30m" or "2 days 4 hours", clock notation like 01:30:00 or 90:00, and ISO 8601 durations like PT1H30M. You can mix all four in one paste; each line is read on its own.

Because a duration in seconds cannot honestly become months. A month is 28 to 31 days depending on which one, so any conversion has to invent an average and quietly introduce an error. Weeks are the largest fixed unit, so weeks are where it stops.

It is the ISO 8601 duration form: P for period, T separating the date part from the time part, then the components. PT1H30M is an hour and a half; P1DT2H is a day and two hours. It turns up in API schemas and configuration formats because it is unambiguous across locales.