Duration Formatter

formatters

How to use the Duration Formatter

Convert any duration to multiple formats at once — just enter a value, choose your input unit, and read off all formatted outputs instantly.

1

Enter your duration value

Type your raw time value into the input field. The tool accepts any non-negative number, including decimals for sub-second precision.

2

Select your input unit

Choose whether your value represents milliseconds, seconds, minutes, or hours. The tool normalizes the input before formatting to ensure accurate results across all output formats.

3

Copy any formatted output

All output formats — HH:MM:SS, human-readable breakdown, and ISO 8601 duration string — are displayed at once. Click the copy button next to whichever format you need.


When to use this tool

Use the Duration Formatter whenever you need to present a raw time value — in seconds or milliseconds — as something meaningful and readable for humans or systems.

  • Converting a performance benchmark result (e.g., 92,340 ms) into a readable '1 minute, 32.34 seconds' string.
  • Formatting video or audio runtimes from raw second counts for metadata, subtitles, or content descriptions.
  • Generating ISO 8601 duration strings (like PT1H30M) for calendar APIs, schema markup, or data feeds.
  • Displaying elapsed time in logs or monitoring dashboards in a clear HH:MM:SS digital clock format.
  • Breaking down session durations from analytics exports into days, hours, and minutes for reports.
  • Checking how a countdown timer value (in milliseconds) will display before implementing it in a UI.

Frequently asked questions

Q:What input units does the Duration Formatter accept?
The tool accepts duration values in milliseconds, seconds, minutes, and hours. Simply select your unit from the dropdown after entering your value, and the tool normalizes it automatically before generating all formatted outputs. Decimal values are supported, so you can enter values like 90.5 seconds without any issue.
Q:What is an ISO 8601 duration string and when do I need one?
An ISO 8601 duration string represents a time span in a standardized format, such as PT1H30M20S (1 hour, 30 minutes, 20 seconds) or P2DT4H (2 days and 4 hours). These strings are required when submitting structured data to calendar APIs (like Google Calendar), writing JSON-LD schema markup for videos, or working with systems that comply with the ISO 8601 standard.
Q:How does the tool handle durations longer than 24 hours?
The Duration Formatter handles arbitrarily long durations without rolling over into days incorrectly. If your input exceeds 24 hours, the HH:MM:SS output will show hours beyond 24 (e.g., 26:15:00), and the human-readable breakdown will include a 'days' component. The ISO 8601 string will also reflect the correct number of days (e.g., P1DT2H15M).
Q:Can I use this tool to format video runtimes for YouTube or podcast metadata?
Yes, this is a common use case. Enter your runtime in seconds (as returned by a video processing API) and the tool will give you both the HH:MM:SS format typically used in video players and the ISO 8601 string needed for VideoObject schema markup. Both outputs can be copied with a single click.
Q:What's the difference between a duration and a timestamp?
A duration represents an elapsed span of time (e.g., '1 hour and 30 minutes'), whereas a timestamp represents a specific point in time (e.g., 'January 15, 2026 at 3:00 PM UTC'). This tool is for formatting durations. If you need to convert a Unix epoch timestamp into a human-readable date and time, use the Unix Timestamp Formatter tool instead.
Q:Does the tool work with millisecond-precision values from performance APIs?
Yes. The tool fully supports millisecond inputs, including fractional milliseconds. This makes it useful for formatting output from browser performance APIs like performance.now() or Node.js process.hrtime(), where durations are returned in high-precision millisecond values.