Read the colon before choosing units
01:30 always means one hour and thirty minutes. For one minute and thirty seconds, use 00:01:30 or 1m 30s. The input-unit selector only affects numbers without a suffix.
Date and time
Enter one duration per line. Two-part clock input means hours:minutes; bare numbers use the selected input unit.
Your input is processed in this browser and is not sent to a server.
One value per line: PT1H30M, 01:30 (= 1h 30m), 1h 30m, or 90.5. Short units: w d h m/min s ms.
Fixed day = 24 hours; week = 7 days. P1M (month) is rejected; PT1M (minute) is accepted.
Exact whole milliseconds only. Use a decimal dot; target values may be rounded to 9 decimals.
Maximum: 1000 lines, 100000 UTF-16 code units, 512 per line; ±10^18 ms per duration. Empty lines are errors.
Enter input or choose an example to begin.
Use the duration converter when an API returns PT1H30M but a timeout setting expects seconds. Compare that value with a spreadsheet entry such as 1.5 hours without treating either as a date.
A batch can mix ISO strings, clock notation and short units. The report keeps each original line next to its answer, so a malformed entry does not shift the remaining results out of alignment.
The duration converter gives PT1H30M, 01:30 and 1h 30m the same 5400-second value. Each result also includes exact milliseconds and a human readable duration in total-hour notation, making a unit mismatch easier to spot.
A month has no single fixed length in seconds. A line containing P1M is rejected while PT1M becomes 60 seconds. Valid lines continue through the batch, so one calendar quantity cannot silently become a guessed number.
01:30 always means one hour and thirty minutes. For one minute and thirty seconds, use 00:01:30 or 1m 30s. The input-unit selector only affects numbers without a suffix.
Automatic conversion waits 350 ms after editing. Turn it off to inspect a batch before running, then use the Convert button or Ctrl/Cmd + Enter. Changing any option makes the previous report stale immediately.
Invalid and empty lines remain in the report. Read the error at its original line, and check any rounded marker against the exact millisecond total. Show more adds 50 rows; both exports contain the entire batch.
Accept standalone whole weeks such as P2W or an ordered day/time form such as P1DT2H3M4.005S. The output balances fixed days, hours, minutes and seconds; zero becomes PT0S.
Choose milliseconds, seconds, minutes, hours, 24-hour days or 7-day weeks. For hours to minutes, select hours for a bare value such as 1.5 and minutes as the target; the answer is 90.
A leading minus applies to the entire expression: -1h 30m is negative ninety minutes. Decimal unit input is accepted only when it maps exactly to integer milliseconds, so 0.1s is preserved without binary floating-point noise.
Each nonempty value is parsed independently. The report shows the original text, target value, exact milliseconds, ISO string and total-hour clock form. Invalid rows retain their position and explanation instead of becoming zero.
Enter an ISO 8601 duration from the supported subset, H:MM or H:MM:SS.fff, short units such as 2h 5m, or a decimal number. A plain number uses the selected input unit, which starts at seconds. Different forms may share one batch.
Yes. For example, 1.5 hours is 5400000 milliseconds. Numeric input supports up to nine decimal places when the value is an exact whole number of milliseconds. ISO and clock seconds allow up to three; finer input is rejected rather than truncated.
Place one minus sign before the complete duration, as in -PT1H or -1h 30m. Individual signed components are not accepted. Negative zero is normalized to zero. This sign support is an extension of the documented ISO subset.
Calendar years and months depend on the starting date. This tool does not substitute an average: P1Y and P1M produce errors. Use a date calculation with an actual start and end if you need elapsed time across a calendar period.
Yes. Every successful row includes a normalized ISO string alongside the target value. For instance, 90061 seconds becomes P1DT1H1M1S. The total-hour form is also shown as 25:01:01 so days do not hide elapsed hours.
Unexpected result?
Try the duration converter with the mixed example, then replace it with your own values. Review ambiguous clock notation and rounded values before using a result in a timeout or report.