deftools.io Everyday Tools

⏱️ Duration Converter

Convert duration to seconds and back. Convert seconds to hours, minutes, human readable (1h 30m), colon notation (01:30:20), and ISO 8601 (PT1H30M20S).

Type a value in any unit
All formats
Try an example

About this tool

A duration converter takes any time value — seconds, colon notation, human shorthand, or ISO 8601 — and shows it in every common format at once. This is the tool you reach for when a log shows 5400 seconds and you need to know it's an hour and a half, or when an API returns PT2H15M and you need to display "2 hours 15 minutes" to a user.

It accepts any of: a plain number (seconds), colon notation like 01:30:00 or 02:30, human shorthand like 1h 30m, 90m, or 2d 4h, and ISO 8601 durations like PT1H30M20S. Example: PT2H15M → seconds 8100, human 2h 15m, words "2 hours and 15 minutes".

FAQ

What input formats does it recognize?

Plain numbers are treated as seconds (e.g. 90 = 90 s). Colon notation works for H:M:S and M:S (e.g. 01:30:00 or 02:30). Human shorthand accepts 1h 30m, 90m, 2d 4h, 45s, 500ms. ISO 8601 durations like PT2H15M, P1DT12H, or P3W are also parsed. The detected format is shown under the input.

Does it handle fractional seconds and decimals?

Yes. Entering 90.5 gives 90.5 seconds and the equivalent in every format. Fractions are preserved up to three decimal places to avoid floating-point noise like 2.0000000001.

Can it convert negative durations?

Yes. A leading minus sign is honored in plain numbers, colon notation (-01:30:00), and ISO 8601 (-PT1H). Human shorthand uses the sign of each token, so "-1h 30m" is -90 minutes.

What does the "year" unit equal?

A year uses the Julian year of 365.25 days (31,557,600 seconds), the same value the ISO 8601 and scientific communities use. A week is 604,800 seconds (7 × 24 × 3600).

More everyday tools

Copied!