Relative Time Formatter Online
Turn any date into a friendly "time ago" phrase or humanize a raw duration, right in your browser.
The Relative Time Formatter runs entirely in your browser. The dates and durations you enter never leave your device and nothing is uploaded to ArrayKit.
Open the Date Duration Calculator
About Relative Time Formatter
The Relative Time Formatter turns a date and time into a natural language phrase like "3 hours ago" or "in 2 days", the same style you see on social feeds, commit histories, and chat apps. Switch to Time Ago mode, pick a date, and watch the phrase tick live as time passes. Switch to Humanize Duration mode to turn a raw millisecond or second count into a readable breakdown such as "1 minute, 30 seconds", useful for logging, debugging timers, or showing elapsed time in a UI. Both modes handle singular and plural units correctly and pick sensible largest-first units automatically. It is built for developers formatting timestamps for a changelog, comparing log entries, or writing copy that needs to read like "just now" instead of a raw ISO string. Everything runs locally — no dates or durations are uploaded.
Features
- Converts any date and time into a natural "x ago" or "in x" phrase
- Live-updating relative time that ticks every second while the tab is open
- Humanizes a raw duration in milliseconds or seconds into readable units
- Automatically picks the largest sensible unit — seconds up to years
- Correct singular and plural handling ("1 hour" vs "2 hours")
- Adjustable precision for durations: 2, 3, or 4 units of detail
- Shows the exact target time, current time, and millisecond difference
- Runs entirely in your browser with nothing uploaded
How to use the Relative Time Formatter
- Choose Time Ago mode and pick a date and time, or click Now
- Read the live relative-time phrase and the exact difference in milliseconds
- Switch to Humanize Duration mode and enter a duration in seconds or milliseconds
- Copy the humanized phrase or adjust precision for more or fewer units
Example
Input
90000 ms
Output
1 minute, 30 seconds
Humanize Duration mode breaks 90,000 ms into readable units.
Common errors & troubleshooting
- The relative time phrase always shows "just now" even though the date is in the past. — Gaps under 5 seconds always read as "just now" by design. Pick a date further in the past to see minutes, hours, or days.
- Humanize Duration shows fewer units than expected. — The output is capped by the Precision control (2, 3, or 4 units). Increase it to see smaller units like minutes or seconds.
- The date and time input won't accept a value. — Use the native date-time picker or type in the format your browser expects (year-month-day, hour:minute) rather than an arbitrary date string.
- A future date shows "in x" instead of "x ago". — That is expected — the Relative Time Formatter compares your chosen date to the current time and prefixes future dates with "in".
Frequently asked questions
- What is the Relative Time Formatter?
- It is a time ago calculator that converts a date and time into a natural language phrase like "3 hours ago" or "in 2 days", and a second mode that humanizes a raw millisecond or second duration into readable units.
- How does the Relative Time Formatter decide between seconds, minutes, hours, days, and years?
- It picks the largest unit where the difference is at least one whole unit, so a 90-minute gap shows as "1 hour ago" rather than "90 minutes ago". Diffs under 5 seconds always show as "just now".
- Does the time ago phrase update automatically?
- Yes. While Time Ago mode is active, the phrase re-renders once a second so it stays accurate as real time passes, without needing to refresh the page.
- What does Humanize Duration mode do differently from Time Ago mode?
- Time Ago mode compares a date to the current moment. Humanize Duration mode takes a raw number of milliseconds or seconds — like a timer value or an API latency — and breaks it into readable units such as "2 days, 3 hours".
- Can I control how many units the humanized duration shows?
- Yes. The Precision control lets you choose 2, 3, or 4 units, so a duration can read as "2 days, 3 hours" or expand to "2 days, 3 hours, 5 minutes, 12 seconds".
- Does the Relative Time Formatter upload the dates or durations I enter?
- No. All parsing and formatting happens locally in your browser. The date and duration values you enter never leave your device.
Related tools
- Date Duration Calculator — Calculate the duration between two dates in years, months, weeks, days and business days.
- Duration Converter — Convert a duration between seconds, minutes, hours, days, HH:MM:SS and human formats.
- Unix Timestamp Converter — Convert between Unix timestamps and human dates (local + UTC).
- Date Calculator — Add or subtract years, months, weeks and days from a date to find the resulting date.
- Time Duration Calculator — Calculate the hours and minutes between two times of day, even across midnight.
- Age Calculator — Calculate exact age in years, months and days as of any date, plus totals in weeks, days, hours and next birthday.
All ArrayKit tools