Skip to content
ZeroServer.tools

Time to Seconds Converter

Convert HH:MM:SS time notation to total seconds, or seconds to HH:MM:SS.

Total seconds
5,400
1h × 3600 + 30m × 60 + 0s = 5,400 s

Quick examples

How HH:MM:SS to seconds conversion works

Converting between HH:MM:SS notation and raw seconds is a common task in programming, video production, and analytics. The formula is straightforward: total = hours × 3600 + minutes × 60 + seconds. This tool handles both directions — paste a time like 1:30:00 to get 5400 s, or enter seconds to get the human-readable duration.

For the opposite direction, also see Seconds to Time Converter. For longer date ranges, use the Time Duration Calculator.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Turning a colon-notation duration into the total seconds a config field wants.
  • Converting a video timestamp into seconds for an API parameter.
  • Summing several durations by converting each to seconds first.
  • Checking a timeout expressed as HH:MM:SS against a numeric limit.
  • Converting back the other way to read a raw seconds figure.

Frequently Asked Questions

What input formats are accepted?
`H:MM:SS`, `M:SS`, or a bare integer. The two-part form is minutes and seconds, not hours and minutes — `5:30` is five and a half minutes, matching how video timestamps read. A bare number is taken as seconds, which is how you convert in the other direction.
Why is 1:75 rejected?
Because a minutes or seconds field of 60 or more is not a valid clock reading, and silently normalising it to 2:15 would hide a typo in a subtitle file or a log. If you genuinely have 75 seconds, enter the bare number and the tool converts it to 1:15 for you.
How is the total calculated?
hours × 3600 + minutes × 60 + seconds, and the breakdown line shows each term so the arithmetic is checkable. 1:30:00 is 1 × 3600 + 30 × 60 + 0 = 5400 seconds — the number FFmpeg, YouTube timestamps and most video APIs actually want.
Can I go beyond 24 hours?
Yes. The hours field is unbounded because a duration is not a time of day — 30:00:00 is a perfectly meaningful 108,000 seconds. Only minutes and seconds are capped at 59, since those roll over into a larger unit and hours have nothing to roll into.
Are fractional seconds supported?
No — the parser takes whole seconds. Frame-accurate work uses either a frame number or an `HH:MM:SS.mmm` timestamp, which is a different format with its own rounding rules. For durations measured to the second, this is the right shape and the exact arithmetic.

Common errors and gotchas

  • Treating a colon value as decimal, where 1:30 is ninety seconds and not one point three.
  • Losing the hours component when the input has only two parts, which could be MM:SS or HH:MM.
  • Confusing a duration with a time of day, which is the same notation meaning something different.
  • Assuming seconds when the target expects milliseconds, a factor of a thousand.
  • Rolling over incorrectly past 59, where 90 seconds is 1:30 rather than 0:90.

Related Converters tools

Private & free — this tool runs entirely in your browser.

IndieKitShip your Next.js startup in days.affiliate