Home Tools Blog About

Convert Seconds to Time

In short

Convert seconds to HH:MM:SS, days/hours/minutes/seconds, words, and ISO 8601 duration. Reverse too. Free, offline, client-side, instant, secure.

  • Runs in your browser
  • Nothing uploaded
  • Free, no sign-up

Convert seconds into six formats at once: HH:MM:SS, DD:HH:MM:SS, compact (1d 2h 3m 4s), words, ISO 8601 duration (P1DT2H3M4S), and largest-unit summary. Reverse direction parses any of these back to seconds. Decimal input preserves milliseconds. Batch mode emits TSV.

Type a value to begin.
🛡
100% PrivateNo server uploads, ever
InstantRuns in your browser
💧
No WatermarksClean output, always
🆓
Free ForeverNo accounts, no limits

How to Use Convert Seconds to Time

  1. Type a number of seconds. Integer (3600) or decimal (3661.5) - decimals preserve milliseconds in the compact, words, and ISO output rows. Negative values are rejected with a clear error rather than silently converted to positive (which is what most converters do).
  2. Read all six output formats at once. The primary row shows HH:MM:SS (hours can exceed 24 for long durations - 90,000 seconds becomes 25:00:00). Below it, DD:HH:MM:SS shows the day field for inputs ≥ 86,400 seconds. Compact (1d 2h 3m 4s), words (1 day, 2 hours…), ISO 8601 duration (P1DT2H3M4S), and largest-unit summary (1.5 days) complete the panel.
  3. Use the breakdown for sanity checks. The breakdown section spells out days / hours / minutes / seconds / ms separately - useful when verifying the conversion math against a spec or when only one of those values matters to you.
  4. Batch convert by pasting multiple lines. Each line becomes one row in a TSV table with columns Input / HH:MM:SS / Compact / Words / ISO / Decimal seconds. Download as .tsv and the file opens directly in Excel or Google Sheets with proper columns.
  5. Reverse with Swap. Click ⇄ Swap and direction flips to Time → Seconds. The parser accepts every format the tool emits: 1d 2h 3m 4.5s, 25:01:01, P1DT2H3M4S, even spelled-out forms like "1 hour 30 minutes". Output becomes total decimal seconds plus a sanity-check breakdown.
  6. Copy or Download. Copy puts the multi-format text report on your clipboard. Download saves seconds-time.txt (single conversion) or seconds-time.tsv (batch). The TSV extension auto-opens in spreadsheet apps.
  7. Stats line summarizes. Shows direction, batch counts (ok / errors), and a short summary of the result. Errors keep the previous output in view so you don't lose work to a typo.

Frequently Asked Questions

Does it really accept decimal seconds for millisecond precision?

Yes – input 3661.5 and you’ll see 01:01:01.500 in HH:MM:SS, 1h 1m 1.5s in compact, 1 hour, 1 minute, 1.5 seconds in words, and PT1H1M1.5S in ISO. Milliseconds are rounded from the fractional part (so .5 = 500 ms). Most “seconds to time” converters silently drop decimals because they use parseInt – this one uses Number() and propagates the fraction through every output format.

What happens with negative values?

Rejected with a specific error: “Negative seconds not allowed – use absolute value or Swap to reverse”. This is intentional. A common bug in seconds-to-time tools is silently calling Math.abs() so that -3600 displays as 01:00:00 with no indication anything was wrong – the result looks correct but the sign was eaten. We surface the issue instead.

How big can the input be?

Up to Number.MAX_SAFE_INTEGER (≈ 9.0 × 10¹⁵, or 285 million years in seconds). Beyond that, JavaScript’s double-precision floats lose integer precision and the breakdown stops being reliable, so the tool rejects with a specific error pointing to the cap. For everyday inputs (durations, video lengths, timestamps), you’ll never hit it.

What’s the difference between HH:MM:SS and DD:HH:MM:SS?

HH:MM:SS rolls everything into hours – 90,000 seconds becomes 25:00:00. DD:HH:MM:SS splits the day field out – same input becomes 01:01:00:00. Use HH:MM:SS for video timestamps, stopwatch displays, and CSS-friendly times. Use DD:HH:MM:SS for elapsed durations where “1 day, 1 hour” reads more naturally than “25 hours”.

Why include ISO 8601 duration format?

ISO 8601 durations (P1DT2H3M4S) are the standard interchange format for durations in APIs (JSON Schema, OpenAPI, GraphQL), databases (PostgreSQL interval), and code libraries (Java Duration, Python isodate, C# TimeSpan). If you’re feeding the converted value into one of those, copy the ISO row and it’ll parse on the receiving end without extra work.

How is “largest unit” calculated?

The tool picks the largest unit that produces a non-trivial number (≥ 1) and shows that with one decimal place. So 90,000 s = 25.0 hours (not 1.0 day because hours fits cleaner). 86,400 s = 1.0 days. 45 s = 45.0 seconds. Useful for at-a-glance scale checks where you don’t need precision but want “is this minutes or days?” instantly.

Which time-to-seconds formats does Swap accept?

Six: (1) Colon-separated HH:MM:SS or D:HH:MM:SS (2) compact 1d 2h 3m 4s with unit suffixes (3) full words "1 day, 2 hours, 3 minutes, 4 seconds" with commas optional (4) ISO 8601 P1DT2H3M4S (case-insensitive) (5) bare seconds (just a number) (6) millisecond suffix 1500ms. Mixed formats in batch mode work too – each line parsed independently.

What if I use plural and singular together?

The parser is lenient – 1 hour, 2 hours, 1 hr, 2 hrs all work. Output is grammatically correct: 1 day, 2 hours (singular for 1, plural for everything else). Zero values are skipped entirely in compact and words formats so the output stays clean rather than padding with 0 hours, 0 minutes.

Is my input uploaded anywhere?

No. All parsing, breakdown, format generation, and TSV emission run in your browser. Open DevTools → Network and confirm zero requests fire – even when you Convert, Swap, or Download. Safe for timestamp data from logs, video metadata, or anything you’d rather not send to a third-party converter.

Does it work offline?

Yes. Total bundle is about 20 KB. Load once, disconnect, keep using. Time conversion is a pure computation – no fonts to fetch, no analytics, no remote API. Useful on planes, in airgapped dev environments, or whenever a quick local conversion beats opening a cloud tool.

Keep going

Related Tools

All Time tools →

Convert Time to Seconds

Convert HH:MM:SS, ISO 8601, compact, words to total seconds (and back). Batch input. Free,…

Add Fuzziness to Clock Time Generator

Add Fuzziness to Clock Time Online - Generate randomized time variations for testing, simulations,…

Analyze Clock Time

Mathematically Analyze Clock Time perfectly. Uncover fuzzy phrasing, precise AM/PM calculations, completed percentages, and…

Calculate Average Clock Time

Calculate the average clock time from a list using circular mean - correct across…

Calculate Seconds Since Midnight

Calculate Seconds Since Midnight - exact seconds elapsed since midnight for current or custom…

Calculate Seconds Till Midnight

Calculate Seconds Till Midnight and Count the seconds left until midnight for current or…

Calculate Time Zone Difference

Calculate Time Zone Difference between any two time zones with DST awareness. Free, offline,…

Convert Human Time to Unix Time

Convert dates to Unix timestamps - seconds, ms, μs, ns, FILETIME, ISO. Timezone-aware. Free,…

Convert Military Time to Regular Time

Convert 24-hour military time to 12-hour AM/PM (and reverse). Zulu, batch mode, all zone…

Convert Regular Time to Military Time

Convert 12-hour AM/PM time to 24-hour military time and back. Handles seconds, noon/midnight, and…

Convert Time Between Countries

Convert time between 53 countries with IANA DST handling, date picker, up to 3…

Convert Time Between Timezones

Convert time between any IANA timezones with DST handling, date picker, up to 3…

Share

Embed this tool

Add this free tool to your website. Copy and paste the code: