ISO 8601 duration to readable text

ISO 8601 durations appear in video APIs, XML schemas, calendars and databases. Paste one to read it at a glance.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter iso 8601 duration.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

P starts the duration; before T come Y years, M months, W weeks and D days; after T come H hours, M minutes and S seconds. Totals use week = 7 days and day = 86,400 s.

Example

Inputs: ISO 8601 duration = P1DT2H30M. Result: Duration: 1 day, 2 hours, 30 minutes; Total seconds: 95,400; Total hours: 26.5.

Limits and caveats

  • Years and months vary in length, so no total in seconds is given for them.
  • The alternative form such as P0001-02-03T04:05:06 and negative durations are not supported.

Questions about this tool

What does PT1H30M mean?

1 hour 30 minutes. T separates the date part from the time part, and M after T means minutes.

What is the difference between P1M and PT1M?

P1M is one month because M comes before T; PT1M is one minute.

Are fractions allowed?

Yes, on the last component only, as in PT0.5H or PT1M30.5S.