Convert Unix epoch timestamps in seconds and milliseconds to UTC, ISO 8601, and local human dates.
Unix Epoch Time (POSIX time) is a system for tracking time defined as the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970 (the Unix Epoch), excluding leap seconds.
Epoch timestamps are used across backend databases, web APIs, OAuth tokens, and system log files because they represent moments in time as simple, timezone-agnostic integers. Converting between epoch seconds, epoch milliseconds, ISO 8601 strings, and local time zones is a daily developer requirement.
JavaScript and Java use 13-digit epoch timestamps in milliseconds, whereas Python, Go, PHP, and C# frequently default to 10-digit epoch timestamps in seconds. Converting between seconds and milliseconds without detecting digit length leads to date parsing errors.
Epoch Seconds: 1784534400 Epoch Milliseconds: 1784534400000 ISO 8601 String: "2026-08-01T08:00:00.000Z" UTC String: "Sat, 01 Aug 2026 08:00:00 GMT"
The Year 2038 problem affects legacy systems storing epoch seconds as signed 32-bit integers, which will overflow on 19 January 2038. Modern 64-bit systems resolve this completely.
Use `Math.floor(Date.now() / 1000)` for seconds or `Date.now()` for milliseconds.