Convert between Unix timestamps (seconds/milliseconds) and human‑readable date‑time representations. Supports ISO 8601, RFC 2822, UTC, local timezone, and custom formats.
The Unix epoch (1970-01-01T00:00:00Z) is the foundation of timestamp systems across computing. Converting between raw timestamps and human‑readable formats is essential for log analysis, API integration, database storage, and distributed systems. This tool provides bidirectional conversion with full transparency, respecting timezone offsets and industry standards (ISO 8601, RFC 2822).
Unix Timestamp = number of seconds (or milliseconds) elapsed since 1970-01-01 00:00:00 UTC (excluding leap seconds).
timestamp = Math.floor((date_utc - Date.UTC(1970,0,1)) / 1000)
JavaScript's Date object handles UTC‑based calculations. For timestamp → date, we create a Date object from the numeric value (seconds ×1000 for JS). For reverse, we parse the datetime string respecting local or UTC offset, then compute milliseconds since epoch. All conversions are validated against edge cases (invalid dates, out-of-range values). The tool also auto‑detects millisecond timestamps when the input exceeds 10 digits, but you can manually switch scale.
| Standard | Format Example | Typical Use Case |
|---|---|---|
| ISO 8601 | 2024-05-20T14:30:00Z | JSON, XML, APIs, data interchange |
| RFC 2822 | Mon, 20 May 2024 14:30:00 +0000 | Email headers, HTTP Date |
| Unix Timestamp (sec) | 1716215400 | Unix systems, file metadata, databases |
| Unix Timestamp (ms) | 1716215400000 | JavaScript, Java (System.currentTimeMillis) |
A DevOps engineer receives logs from servers in different timezones with mixed formats: some use epoch seconds, others RFC 2822. By using this converter, the engineer can normalize all timestamps to ISO 8601 UTC, enabling accurate correlation of events across the distributed system. The converter's ability to handle both seconds and milliseconds ensures compatibility with backend metrics (Prometheus, Graphite) and frontend analytics (JavaScript).
Date object uses the browser's timezone for local conversions – which may produce different outputs for users across time zones.