Epoch Converter
Convert between Unix timestamps and human-readable dates in UTC and local time.
Last updated · View algorithm, constants and default inputs (JSON)
About this calculator
Convert Unix seconds or milliseconds to UTC, then display a clock at your entered UTC offset. Unix timestamps themselves contain no timezone. Enter a valid date/time with an explicit UTC marker or offset; invalid dates show an error. Weekday and day of year use UTC. Convert a seconds or milliseconds timestamp, an ISO date with an explicit zone, or separate UTC date, hour and minute fields. The optional display offset is fixed and does not apply daylight-saving rules.
Worked example
calculated with the default values below
What do you have A Unix timestamp · Unix timestamp 1,789,000,000 seconds · Date and time (UTC) 2026-09-12T12:00:00Z · Timestamp is in milliseconds Seconds · Your timezone offset 8 hours · Date 2027-03-03 · Hour (UTC) 0 · Minute 0 UTC date 2026-09-10T00:26:40Z · Unix timestamp 1,789,000,000 seconds · Unix timestamp 1,789,000,000,000 milliseconds · Local date at your offset 2026-09-10 08:26:40 · Day of the week Thursday · Relative to now 2 months ago · Day of the year 253 · Year 2,026 · Days since 1 Jan 1970 20,706
General background references
Disclaimer
These calculators give general date results. Public holidays, working-day conventions and time-zone rules are set locally and change, so confirm against the official calendar for anything legally or contractually binding.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
t_s = ⌊t_ms ÷ 1000⌋; t_ms = 1000 × t_s
- t_ms
- Epoch milliseconds
- t_s
- Unix time (seconds)
Second inputs are multiplied by 1000. Relative time is rule-based: <60 s seconds, <60 min minutes, <24 h hours, <30 days days, <12 months months, else years; day of year counted from Jan 1.
Frequently asked questions
What happens if I enter an invalid date or timestamp?
The converter rejects unreadable or out-of-range values and shows an input error instead of treating them as the Unix epoch. In date mode, include UTC (`Z`) or an explicit offset so parsing does not depend on your device timezone.
Which outputs use the entered UTC offset?
The local clock adds your entered offset to UTC. The Unix timestamp, UTC date, weekday and day of year remain UTC-based; the local clock does not include a timezone suffix.