ISO-8601 duration
ClientConvert P1DT2H style strings into labeled parts and plain English—or fill years through seconds and copy a normalized duration. Negative values use a leading minus before P.
What this handles
ISO-8601 durations start with P. Calendar units Y, M, W, D appear in the date section. If you include clock units, add T then H, M, S. Decimal fractions use . or , on the last segment you type.
Related tools
For instants and epochs, use the Unix timestamp converter. For repeating schedules, use Cron helper and World clock when comparing zones.
?
Starts with P; date units (Y M W D) before an optional T, then H M S. Examples: PT1H, P3W, P1Y2MT3M (1 year 2 months + 3 minutes).
Result
Human-readable: 1 day, 2 hours, 30 minutes
Normalized: P1DT2H30M
Common use cases
- Read JWT exp/nbf style offsets when docs say “duration” alongside Unix timestamps.
- Normalize vendor strings (P1DT12H vs PT36H) into one canonical spelling for logs.
- Draft subscription or trial lengths in API specs without guessing separator rules.
- Cross-check cron or wall-clock tools: durations describe spans; crons describe schedules.
Common mistakes to avoid
Confusing M before T with M after T
Before T, M is months. After T, M is minutes. Always locate the T boundary in the string.
Expecting a single fixed length in seconds for Y or M
Years and months are calendar-dependent; this page keeps them as labeled components, not totals.
Mixing weeks with other date units in strict profiles
Some specs prefer P7D over P1W when combining with other date parts. Normalize carefully for your standard.
FAQ
Is input sent to a server?
No. Parsing and formatting run only in your browser tab.
Do you validate against a JSON Schema duration pattern?
This tool follows common ISO-8601 duration text rules (P…, optional T for time). Edge cases in your schema may differ—compare with your validator.
How does this relate to the timestamp tool?
Timestamps are instants; durations are lengths. Add a duration to an instant in your application code or calendar library.
Common search terms
Phrases people search for that match this tool. See the full long-tail keyword index.
- iso 8601 duration parser online
- parse pt1h duration in browser
- iso8601 duration human readable
- build iso duration p1dt string
More tools
Related utilities you can open in another tab—mostly client-side.
Unix timestamp converter
ClientEpoch to date: seconds, milliseconds, ISO-8601, UTC and local time—in browser.
Cron expression helper
ClientHuman-readable schedule, next run times—standard 5-field cron in your browser.
World clock & time zones
ClientCompare IANA time zones side by side with the same instant—no server round-trip.
Schedule tools
ClientUnix epoch and ISO conversion, ISO-8601 duration parse/build, cron expression parsing, and multi time zone comparison—index of time utilities; each tool keeps data in your tab.