ISO 8601 Duration Parser / Formatter
TimeParse an ISO 8601 duration like P3DT4H30M into its components and total seconds, or format a number of seconds back into a canonical duration string.
ISO 8601 durations show up in places timestamps do not: YouTube video lengths in the API (contentDetails.duration), retry and timeout configs, database interval columns, and JSON scheduling payloads, all written as strings like PT1H30M or P3DT4H. This tool goes both ways. Parse mode breaks a duration string into its years, months, weeks, days, hours, minutes, and seconds and gives you a total in seconds plus a plain-English readout. Format mode takes a number of seconds and builds the canonical duration back out. Years and months have no fixed length, so when a parsed value contains them the total-seconds figure is flagged approximate and uses 365-day years and 30-day months, and formatting deliberately emits only days through seconds to stay unambiguous. Everything runs locally with no dependencies.
How to use ISO 8601 Duration Parser / Formatter
- 1.Choose Parse to turn an ISO 8601 string into components and seconds, or Format to turn seconds into a duration string.
- 2.Type or paste the value: a duration like P3DT4H30M, or a number of seconds like 90061.
- 3.Read the breakdown, the total in seconds, and the human-readable form; watch for the approximate flag when years or months are involved.
Frequently asked questions
Use via API, SDK, or MCP
cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/iso8601-duration \
-H "Authorization: Bearer utx_live_..." \
-H "Content-Type: application/json" \
-d '{"mode":"parse","input":"P3DT4H30M","seconds":90061}'Get an API key from your dashboard · Full API docs →