UnitCompiler
💻

Unix Timestamp & Epoch Converter

Live Unix epoch ticker, two-way timestamp to UTC & Local time converter, milliseconds support, and programmer reference.

Live Unix Epoch Clock
Seconds since Jan 01 1970 00:00:00 UTC
Epoch Seconds (10 digits)
1756500000
Epoch Milliseconds (13 digits)
1756500000000

Timestamp → Human Date

• •
UTC / GMT (ISO 8601)
2025-08-29T20:40:00.000Z
RFC 2822 Format
Fri, 29 Aug 2025 20:40:00 GMT
Your Local Timezone
Loading...
Relative: in 1 year

Human Date → Unix Timestamp

Interactive Picker
Unix Timestamp (Seconds)
1756500000
Unix Timestamp (Milliseconds)
1756500000000
Hexadecimal:0x68B251E0

Developer Epoch Reference & Code Snippets

JavaScript / TypeScript

Exact Formula
Math.floor(Date.now() / 1000)

Date.now() returns milliseconds. Divide by 1000 to get standard 10-digit Unix timestamp seconds.

Example: new Date(1756500000 * 1000).toISOString()

Python 3

Exact Formula
import time; int(time.time())

time.time() returns floating-point seconds since epoch. Cast to int for integer seconds.

Example: from datetime import datetime; datetime.fromtimestamp(1756500000)

Year 2038 Problem (Y2K38)

Exact Formula
Max 32-bit Signed = 2,147,483,647

32-bit signed integers will overflow on 19 January 2038 at 03:14:07 UTC. Modern 64-bit systems are safe for 292 billion years.

Example: 2147483647 = Tue, 19 Jan 2038 03:14:07 UTC

How This Calculation Works

A Unix timestamp (POSIX Epoch time) counts exact elapsed seconds since midnight UTC on January 1, 1970 (1970-01-01T00:00:00Z), ignoring leap seconds. Widely stored across databases, REST APIs, and JWT expiration tokens, 10-digit values measure seconds whereas 13-digit JavaScript timestamps count milliseconds (× 1,000).

Core Formulas & Identities

Epoch Definition
Epoch (s) = Seconds elapsed since 1970-01-01 00:00:00 UTC
Seconds ↔ Milliseconds
Epoch (ms) = Epoch (s) × 1,000 (10 digits vs 13 digits)
32-bit Signed Overflow
Y2K38 Limit = 2³¹ − 1 = 2,147,483,647 (2038-01-19 03:14:07 UTC)

Variable Legend:Unix timestamps are always timezone-independent in UTC; only formatted display strings apply local timezone offsets.

Step-by-Step Worked Examples

Example1

Inspect Epoch 1,000,000,000 (1 Billion Seconds)

  1. Divide 1,000,000,000 by 86,400 seconds/day ≈ 11,574.07 days.
  2. Count forward from January 1, 1970.
  3. Land on September 9, 2001 at 01:46:40 UTC.
Result:2001-09-09T01:46:40.000Z
Example2

Convert ISO Date 2026-01-01T00:00:00Z to Milliseconds

  1. Compute Unix seconds for Jan 1, 2026 UTC = 1,767,225,600 s.
  2. Multiply by 1,000 for JavaScript Date.now() scale.
  3. Verify 10-digit vs 13-digit length.
Result:1767225600 s / 1767225600000 ms

Practical Applications & Accuracy Tips

  • 10-digit values (~1.7×10⁹) represent seconds; 13-digit values (~1.7×10¹²) represent milliseconds.
  • One standard day contains exactly 86,400 Unix seconds; one hour has 3,600 seconds.
  • Upgrade legacy signed 32-bit integer columns to 64-bit before the Year 2038 overflow date (Jan 19, 2038).