DUR

Duration Converter

Convert non-negative time units and complete duration strings

Units, Time & Number
πŸ”’ 100% client-side β€” your data never leaves this page
Maintained by Evanβ€’Updated: September 30, 2026
Options
Input

Enter seconds or a duration string first to convert between numeric and human-readable formats immediately; examples are available in Advanced mode.

Output
Converted duration values will appear here
πŸ”’ Processed locally in your browser Β· duration conversion only
Page reading mode

The full guide also includes pitfalls, worked examples, snippets, FAQs, and related tools for checking results or troubleshooting.

About this tool

Convert a non-negative numeric duration in milliseconds, seconds, minutes, hours, days or weeks, or parse complete unit strings such as 1h30m and 1500ms. Adjacent tokens and whitespace are accepted; stray text, signs and incomplete tokens in string mode are rejected. Output includes six numeric units, a compact form and an ISO 8601 duration; 1500ms becomes PT1.5S rather than losing its half second. Days mean exactly 24 hours and weeks mean seven such days, without calendar or daylight-saving calculations. Browser floating-point arithmetic is approximate; numeric rows display up to 15 significant digits and total milliseconds must not exceed 9,007,199,254,740,991. ISO input, months, years and negative durations are not supported. Changes clear prior results; no input draft is stored.

Production Snippets

Preserve fractional seconds and reject partial matches

text

1500ms β†’ 1.5 seconds β†’ PT1.5S
1h30m β†’ 5400 seconds β†’ PT1H30M
0s β†’ PT0S
-1s / junk1h / 1h xyz β†’ error
1d is always 86400 seconds here.

Frequently Asked Questions

Which human-duration syntax is accepted?

Use non-negative decimal amounts followed by w, d, h, m, s or ms, for example 1h30m, 2.5h or 500ms. The whole string must match; -1s, junk1h, ISO P1D and clock text 1:30 are rejected.

Are milliseconds lost in ISO output?

No. 1500ms becomes PT1.5S and 0.5ms becomes PT0.0005S. The numeric calculations remain floating-point approximations, not arbitrary-precision decimal arithmetic.

Does one day account for daylight saving time?

No. Here 1d always equals 86,400 seconds. Use calendar and timezone tools when comparing actual local dates across offset changes.

Can I convert zero, months or negative intervals?

Zero is valid and outputs PT0S. Months, years and negative intervals are outside this fixed-unit converter; total milliseconds must fit the stated supported range.

Keep browsing