ISO 8601 Duration Parser
Turn ISO 8601 durations such as PT1H30M or P1Y2M10DT2H into their parts and total seconds, hours and days, or convert a number of seconds into an ISO duration. Add a start date to see when the duration ends.
Frequently asked questions
What is an ISO 8601 duration?
A compact way to write a length of time: P starts the duration, then years Y, months M, weeks W and days D, then T and hours H, minutes M and seconds S. PT1H30M is one and a half hours, P3D is three days.
Where are ISO durations used?
In YouTube and other video APIs, schema.org markup such as cookTime and duration, calendar formats, XML Schema, Java and .NET date libraries, and many REST APIs.
Why are no total seconds shown for months or years?
A month has 28 to 31 days and a year 365 or 366, so a duration with months or years has no fixed length. Enter a start date to get the exact end date and the number of seconds for that period.
How do I convert seconds to a duration?
Enter the number of seconds, for example 5400, and the tool returns PT1H30M. Larger values are written with days, such as P1DT2H for 93600 seconds.
Are fractions and negative durations supported?
Yes. Values like PT1.5H or PT0,5S are accepted, and a leading minus sign such as -P1D marks a negative duration.
Which start date format is expected?
YYYY-MM-DD, optionally with a time such as 2026-11-18 09:00. The end is calculated in plain calendar time without time zone shifts.