Epoch time is a system for tracking time as a running total of seconds or milliseconds. It is widely used in programming, databases, and APIs for its simplicity and universality.
What Is Epoch Time?
Epoch time (also called Unix time or POSIX time) counts the number of seconds since the Unix epoch: January 1, 1970, 00:00:00 UTC. It provides a single numeric value that represents any point in time.
Epoch Time Formats
Different systems use different precisions:
| Format | Digits | Unit | Example |
|---|---|---|---|
| Unix seconds | 10 | seconds | 1709049600 |
| Milliseconds | 13 | ms | 1709049600000 |
| Microseconds | 16 | us | 1709049600000000 |
| Nanoseconds | 19 | ns | 1709049600000000000 |
Converting Epoch Time
Epoch to Human-Readable
// JavaScript (milliseconds)
new Date(1709049600000).toISOString();
// "2024-02-27T16:00:00.000Z"
# Python (seconds)
from datetime import datetime, timezone
datetime.fromtimestamp(1709049600, tz=timezone.utc)
# 2024-02-27 16:00:00+00:00
Human-Readable to Epoch
// JavaScript
new Date("2024-02-27T16:00:00Z").getTime() / 1000;
// 1709049600
Common Epoch Values
| Date | Epoch (seconds) |
|---|---|
| Jan 1, 1970 (Unix epoch) | 0 |
| Jan 1, 2000 (Y2K) | 946684800 |
| Jan 1, 2025 | 1735689600 |
| Jan 19, 2038 (32-bit overflow) | 2147483647 |
Why Use Epoch Time?
Common Pitfalls
Try It Yourself
Convert between epoch timestamps and human-readable dates with our free Epoch Converter. Supports seconds, milliseconds, and multiple date formats.