Converts between seconds and a human-readable duration.
Duration Formatter converts a number of seconds into a human-readable duration like "1d 2h 3m 4s", and converts that compact format back into a total number of seconds. It uses days, hours, minutes, and seconds, making it handy whenever you need to humanize a timeout, TTL, or elapsed time, or turn a written duration back into raw seconds.
No. The tool runs entirely in your browser and performs the conversion locally in JavaScript. Nothing you enter is uploaded or sent anywhere.
It uses four units: days (d), hours (h), minutes (m), and seconds (s). The human-readable output looks like "1d 2h 3m 4s", and units with a zero value are omitted.
It accepts a single non-negative integer number of seconds. Decimals, negative numbers, or other characters are rejected, and an input of 0 returns "0s".
Use space-separated tokens of a number followed by a unit letter, such as "2h 30m" or "1d 12h". Each token must match the pattern number + d/h/m/s, otherwise the tool reports an invalid token.
Yes. The number of seconds must be a safe integer (up to 2^53 - 1); larger values are rejected with a "too large" error to avoid precision loss.