ISO 8601 Duration Converter

Parse an ISO 8601 duration string into its components, or build a duration string from individual year, month, week, day, hour, minute, and second values.

Duration String
Duration
P1Y2M3DT4H5M6S
1 year, 2 months, 3 days, 4 hours, 5 minutes, and 6 seconds
Date Part
P1Y2M3D
Time Part
T4H5M6S
Est. Seconds
—
Components
6

About this tool

ISO Duration helps developers, API designers, and QA engineers parse or build ISO 8601 duration strings such as P1Y2M3DT4H5M6S into labeled components, human-readable summaries, and estimated totals. Use it for cron interval checks, API timeout documentation, scheduling logic reviews, and searchable workflows like ISO duration parser or duration string builder.

Use cases

  • Paste an ISO 8601 duration from an API spec, calendar event, or scheduling config to break it down into years, months, weeks, days, hours, minutes, and seconds.
  • Build a duration string from individual time fields to paste into an API request body, cron job config, or iCal DURATION property.
  • Verify that a timeout, TTL, or interval value expressed as a duration string means what you expect before deploying a schedule or configuration change.
  • Copy the human-readable summary of a duration into a ticket, comment, or runbook so teammates understand the interval without decoding the format.

FAQ

What is ISO Duration used for?

Use ISO Duration to parse ISO 8601 duration strings into labeled components and human-readable output, or to build a duration string from individual year, month, week, day, hour, minute, and second values.

What does the ISO 8601 duration format look like?

ISO 8601 durations start with P and use designators: Y for years, M for months, W for weeks, D for days, T to begin the time section, then H for hours, M for minutes, and S for seconds. Example: P1Y2M3DT4H5M6S means 1 year, 2 months, 3 days, 4 hours, 5 minutes, and 6 seconds.

What inputs and outputs should I expect?

For parse mode, enter a duration string and receive components, a human-readable summary, and an estimated total in seconds. For build mode, provide numeric field values and receive the canonical duration string and summary.

Why does the estimated seconds value use approximate month and year lengths?

ISO 8601 months and years vary in length. The estimate uses 30.44 days per month and 365.25 days per year as standard approximations. For exact durations, rely on the labeled components rather than the total seconds estimate.