Code tool

ISO 8601 Duration Formatter

Enter elapsed-time parts and format them as PnDTnHnMnS.

In-browser processingNo account requiredPrivacy details ↗

Formats fixed elapsed days, hours, minutes, and seconds. Calendar years and months are not inferred.

A QUICK WALKTHROUGH

How to use this tool

  1. Enter days, hours, minutes, and seconds.
  2. Format the duration locally.
  3. Copy the ISO 8601 result.

Fixed elapsed-time scope

Days, hours, minutes, and seconds are formatted in ISO order. Hours are 0–23, minutes 0–59, and seconds below 60.

Calendar units excluded

Years and months are not accepted or inferred because their elapsed length depends on calendar context.

GOOD TO KNOW

Common questions

Can it format a calendar month?

No. Enter fixed elapsed-time parts; calendar months and years require a reference date.