Skip to content

Duration Converter

Type a duration in whatever style you have and see it in every unit, as an ISO 8601 duration and as a readable sentence.

Processed locally in your browser

Options
Accepts "1d 2h 3m 4s", "90 minutes", ISO 8601 (PT1H30M), h:mm:ss or a bare number in the unit chosen below.0 chars · 0 lines
The result will appear here.

What is Duration Converter?

Durations appear in many forms: raw seconds in a log, "1h 30m" in a config file, PT1H30M in an API, 01:30:00 on a timer. This tool parses all of them and shows the same value as milliseconds, seconds, minutes, hours, days and weeks, plus the ISO 8601 duration (for example P1DT1H1M1S), a human-readable string in your language, a compact form (1d 1h 1m 1s) and a clock form (25:01:01).

Free text accepts units such as ms, s, sec, min, h, hr, d, day(s) and w, with English, French and Spanish words, and decimals like 1.5h. A bare number uses the unit you choose. Months and years are not units in free text because they have no fixed length; in ISO 8601 input, years count as 365 days and months as 30, and the result says so.

How does it work?

  1. Type or paste a duration, for example 90061 seconds, 1d 2h 3m, PT1H30M or 01:30:00.
  2. For a bare number such as 5400, choose which unit it is in (seconds by default).
  3. Read the value in each unit, the ISO 8601 form, the readable text and the clock form.
  4. Copy the format your API, config or timer expects.

Common use cases

  • Turning a timeout of 5400 seconds in a config file into "1 hour, 30 minutes".
  • Writing an ISO 8601 duration for a YouTube-style API, a calendar or an OpenAPI example.
  • Converting a runtime such as 1d 2h 3m into hours for a report.
  • Checking what P0DT36H means before parsing it in code.

Examples

Try this input in the tool above:

Input
90061 seconds
Output
1 day, 1 hour, 1 minute, and 1 second

Privacy

Duration Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

Durations are exact lengths of time: months and years are approximated (30 and 365 days) when they come from ISO 8601 input, and leap seconds are ignored.

Frequently asked questions

Which input formats are accepted?

Unit expressions (1d 2h 3m 4s, 90 minutes, 1.5h), ISO 8601 (PT1H30M, P1DT12H), clock times (h:mm:ss) and bare numbers in the unit you choose. Negative values with a leading minus sign are supported.

Why are there no months in the outputs?

A month is 28 to 31 days, so converting a duration to months has no exact answer. Weeks and days are shown instead; use the date difference tool for calendar spans.

How is the ISO 8601 duration built?

The total is split into days, hours, minutes and seconds (with decimals for milliseconds), for example 90061 seconds becomes P1DT1H1M1S and zero becomes PT0S.

More tools in Date & Time →