Seconds to HH:MM:SS

Convert raw seconds into clock, day-clock, ISO-8601, or words format with optional fractional-second precision.

Formatted duration

About this tool

Convert a raw seconds value into common duration formats for video timestamps, logs, telemetry, schedules, and API payloads.

Supported formats:

Seconds may be fractional or negative. Use the fractional digits field to retain decimal seconds after rounding. All conversion happens locally in your browser.

FAQ

What happens when the duration is longer than 24 hours?

Depends on the format. hms lets the hours field grow past 24 — 90061 seconds becomes 25:01:01 — which is what video editors and log tools usually expect. If you'd rather see days split out, use dhms (1:01:01:01) or auto, which picks the shortest sensible clock form.

How do I keep fractional seconds like 90.5?

Set the fractional digits field to 1–9. With decimals=1, 90.5 renders as 00:01:30.5; with the default of 0 the value is rounded to whole seconds. The setting applies to every output format, including ISO durations.

Are negative durations supported?

Yes — a negative input is formatted like its positive counterpart with a leading -, so -3661 in hms gives -01:01:01. Handy for countdowns and clock-drift deltas.

What does the ISO format output for zero?

PT0S — the canonical ISO-8601 rendering of a zero-length duration. Non-zero values only include the units they need, e.g. 90061P1DT1H1M1S.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool seconds-to-hms "5025"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/seconds-to-hms/?seconds=5025&format=hms&decimals=0

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.