ISO 8601 Duration Builder

Converts plain time spans to ISO 8601 durations such as PT1H30M, and reads ISO durations back as words. One value per line.

Use the tool

Why this tool exists

Schema fields like prepTime, cookTime, duration and totalTime want ISO 8601 durations, which nobody remembers. Type 1 hour 30 minutes, 90 min, 2:15 or 3 days 4 hours and get PT1H30M, PT1H30M, PT2H15M and P3DT4H. Paste PT1H30M and get 1 hour 30 minutes back.

Minutes roll over into hours and hours into days, and months or years are never guessed from plain words because their length varies. ISO strings are validated against the format.

How to use it

  1. Enter one duration per line.
  2. Read the ISO value on the right.
  3. Paste an ISO duration to see it in words.
  4. Copy the value into your markup.

Frequently asked questions

What does the T mean?

It separates date parts from time parts: P1DT12H is one day and twelve hours.

Why is 2:15 two hours?

h:mm is read as hours and minutes. The video generator reads m:ss instead.

Are weeks supported?

ISO strings with W are accepted and read; plain words use days.

Is 0 valid?

PT0S is the zero duration.