ISO 8601 Duration Converter
Convert ISO 8601 durations like PT1H30M to total seconds, minutes, hours, and human-readable text, or build valid duration strings from components.
Loading tool...
What is ISO 8601 Duration Converter?
The ISO 8601 Duration Converter works with duration strings in the PnYnMnDTnHnMnS format, such as PT1H30M for 90 minutes. Parse any valid duration into its components, get totals in seconds through weeks, or type year-to-second values and receive the canonical string back for your API calls.
Key Benefits
- Understand cryptic duration values returned by APIs in one paste
- Generate standards-compliant duration strings without memorizing the letter order
- Instant totals in seconds, minutes, hours, days, and weeks
- Supports weeks, fractional seconds, and negative durations
- 100% client-side - fast, private, and works offline
Common Use Cases
- β’Decoding video lengths and media metadata from APIs
- β’Writing Google Calendar API event durations correctly
- β’Converting Java Duration or Python timedelta strings for documentation
- β’Building test fixtures for APIs that accept ISO 8601 durations
How to Convert ISO 8601 Durations
- Paste a duration string: Type or paste a duration like PT1H30M into the input box. The parser accepts years, months, weeks, days, and time components.
- Review the breakdown: Check the per-unit table and the totals in seconds, minutes, hours, days, and weeks, computed with nominal month and year lengths.
- Or build your own: Scroll to the builder, enter values for years down to seconds, and toggle the negative sign if needed.
- Copy the result: Click Copy to grab the canonical ISO string or the parsed summary for your code or documentation.
Key Features
- Parse any ISO 8601 duration (PnYnMnDTnHnMnS) with week and fractional-second support
- Build duration strings from year-to-second components in real time
- Totals in seconds, minutes, hours, days, and weeks at a glance
- Human-readable rendering like 1 hour 30 minutes next to the raw string
- Negative durations and copy-to-clipboard for every result
- Runs entirely offline - no uploads, no sign-up