Duration Converter
Type a duration in whatever style you have and see it in every unit, as an ISO 8601 duration and as a readable sentence.
Processed locally in your browser/ Your data stays in your browser.
What is Duration Converter?
Durations appear in many forms: raw seconds in a log, "1h 30m" in a config file, PT1H30M in an API, 01:30:00 on a timer. This tool parses all of them and shows the same value as milliseconds, seconds, minutes, hours, days and weeks, plus the ISO 8601 duration (for example P1DT1H1M1S), a human-readable string in your language, a compact form (1d 1h 1m 1s) and a clock form (25:01:01).
Free text accepts units such as ms, s, sec, min, h, hr, d, day(s) and w, with English, French and Spanish words, and decimals like 1.5h. A bare number uses the unit you choose. Months and years are not units in free text because they have no fixed length; in ISO 8601 input, years count as 365 days and months as 30, and the result says so.
How does it work?
- Type or paste a duration, for example 90061 seconds, 1d 2h 3m, PT1H30M or 01:30:00.
- For a bare number such as 5400, choose which unit it is in (seconds by default).
- Read the value in each unit, the ISO 8601 form, the readable text and the clock form.
- Copy the format your API, config or timer expects.
Common use cases
- Turning a timeout of 5400 seconds in a config file into "1 hour, 30 minutes".
- Writing an ISO 8601 duration for a YouTube-style API, a calendar or an OpenAPI example.
- Converting a runtime such as 1d 2h 3m into hours for a report.
- Checking what P0DT36H means before parsing it in code.
Examples
Try this input in the tool above:
90061 seconds
1 day, 1 hour, 1 minute, and 1 second
Privacy
Duration Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
Durations are exact lengths of time: months and years are approximated (30 and 365 days) when they come from ISO 8601 input, and leap seconds are ignored.
Frequently asked questions
Which input formats are accepted?
Unit expressions (1d 2h 3m 4s, 90 minutes, 1.5h), ISO 8601 (PT1H30M, P1DT12H), clock times (h:mm:ss) and bare numbers in the unit you choose. Negative values with a leading minus sign are supported.
Why are there no months in the outputs?
A month is 28 to 31 days, so converting a duration to months has no exact answer. Weeks and days are shown instead; use the date difference tool for calendar spans.
How is the ISO 8601 duration built?
The total is split into days, hours, minutes and seconds (with decimals for milliseconds), for example 90061 seconds becomes P1DT1H1M1S and zero becomes PT0S.
Related tools
Time Difference Calculator
Enter a start and an end date-time and get the exact elapsed time, broken down into days, hours, minutes and seconds and as totals.
Date & Time
Date Difference Calculator
Enter two dates and get the calendar difference in years, months and days, together with total days, weeks and the number of weekdays.
Date & Time
Unix Timestamp Converter
Paste an epoch value or a date and get every common representation at once: seconds, milliseconds, ISO 8601, RFC 2822, local time and relative time.
Date & Time
Add or Subtract Days from a Date
Pick a start date, choose add or subtract, an amount and a unit, and get the resulting date with its weekday.
Date & Time
Current Unix Timestamp
A live clock that shows the current epoch time in seconds and milliseconds, ready to copy, alongside the ISO 8601 UTC date and your local time.
Date & Time
Timestamp to Date Converter
Paste a column of epoch values from a log or a database export and get one readable date per line, plus a table with the detected unit.
Date & Time