ISO 8601 Duration Parser.
Parse ISO 8601 durations like P1DT2H30M into parts, seconds and plain English, or turn seconds into ISO.
Runs in your browserAbout ISO 8601 Duration Parser
ISO 8601 Duration Parser reads the compact period strings used by APIs, video platforms, calendar files and programming languages, and explains them. PT1H30M becomes 1 hour, 30 minutes and 5,400 seconds; P1Y2M10DT2H30M is split into years, months, days, hours and minutes, with a normalized form and a human sentence. Paste one duration per line to process a whole list, and the total row adds them up. Plain numbers work the other way: 86400 turns into P1D, which is handy when you need to write a YouTube-style or Java Duration value by hand. The parser follows the standard closely. Every duration starts with P, time parts must come after a T, and only the last component may have a fraction, so PT1.5H is valid but P1.5DT2H is not. It also accepts a leading minus sign, week values combined with other units as allowed by ISO 8601-2 and JavaScript Temporal, and the alternative form P0003-06-04T12:30:05. The most common mistake is confusing months and minutes: P1M is one month, PT1M is one minute. Another is assuming a month has a fixed length. Without a reference date, the tool counts a year as 365 days and a month as 30 days and marks those totals as approximate. Enter a reference start date and years and months are applied on the calendar instead, so P1M from 2026-01-31 ends on 2026-02-28 and the total in seconds is exact. Errors point to the line and character that broke the format. Parsing happens entirely in your browser.
How to Use
- Paste one or more ISO 8601 durations, or numbers of seconds, one per line.
- Optionally enter a reference start date to resolve years and months exactly.
- Read the parts, total seconds and plain-English description, then copy the table.
Frequently Asked Questions
What is the difference between P1M and PT1M?
Before the T, M means months; after the T, M means minutes. P1M is one month and PT1M is one minute.
Why is the total marked approximate?
Years and months have no fixed length. Without a reference date the tool uses 365-day years and 30-day months. Add a reference date to apply them on the calendar exactly.
Can I mix weeks with days?
ISO 8601-1 only allowed weeks on their own, but ISO 8601-2 and JavaScript Temporal allow forms like P1W2D, and so does this parser.
Is my data uploaded?
No. The durations are parsed in your browser and the page makes no network requests while you use it.
Related Tools
Count years, months, days and business days between two dates, or add a duration to a date.
Convert between Unix timestamps and dates.
Convert a date and time between IANA time zones, with DST-aware offsets and day shifts.
Parse cron expressions and preview next run times.
Estimate how long a file takes to transfer at a given speed, or the bandwidth needed to move it in time.
Convert between HEX, RGB, and HSL formats.