Epoch & Unix Timestamp Converter
Convert epoch/Unix timestamps to human dates and vice versa — milliseconds, seconds, batch convert
Current Epoch Timestamp
17719139921771913992864What Is an Epoch / Unix Timestamp?
An epoch timestamp (also called a Unix timestamp) is the number of seconds that have elapsed since the Unix epoch — midnight January 1, 1970, 00:00:00 UTC. It is a single integer that represents any specific moment in time, regardless of timezone or locale.
For example:
| Epoch Value | Represents |
|---|---|
0 | January 1, 1970 00:00:00 UTC (Unix epoch origin) |
1000000000 | September 9, 2001 01:46:40 UTC |
1705312200 | January 15, 2024 10:30:00 UTC |
2147483647 | January 19, 2038 03:14:07 UTC (32-bit max) |
-86400 | December 31, 1969 00:00:00 UTC (before epoch) |
Because an epoch timestamp is just an integer, it avoids the complexity of timezones and daylight saving time. Two systems anywhere in the world can store the same epoch value and know they refer to exactly the same instant.
Epoch Seconds vs. Epoch Milliseconds
Unix timestamps were originally defined in seconds (10-digit integers for current dates). Many modern programming environments — particularly JavaScript — use milliseconds (13-digit integers) for finer resolution.
| Format | Digits | Example | Use Case |
|---|---|---|---|
| Seconds | 10 | 1705312200 | POSIX/Unix APIs, databases, logs |
| Milliseconds | 13 | 1705312200000 | JavaScript Date.now(), browser APIs |
This tool auto-detects which unit you’ve entered based on the magnitude of the number:
- Numbers ≥ 10¹² → treated as milliseconds
- Numbers < 10¹² → treated as seconds
Output Formats
After converting a timestamp, the tool displays the result in several standard formats:
| Format | Example |
|---|---|
| ISO 8601 | 2024-01-15T10:30:00.000Z |
| RFC 2822 | Mon, 15 Jan 2024 10:30:00 +0000 |
| UTC | Mon, 15 Jan 2024 10:30:00 GMT |
| Local | Jan 15, 2024, 10:30:00 (in selected timezone) |
| Relative | 2 years ago |
How to Convert an Epoch Timestamp to a Human Date
- Paste your epoch value in the Epoch → Date tab.
- Select a timezone if needed (defaults to UTC).
- Press Convert or hit Enter.
- Copy any result format with the copy button.
You can also click Quick Presets to fill in common reference points: Now, Start of today, Start of week, Start of month, Start of year.
How to Convert a Date to an Epoch Timestamp
- Switch to the Date → Epoch tab.
- Enter a date string in any recognisable format:
- ISO 8601:
2024-01-15T10:30:00Z - ISO 8601 with offset:
2024-01-15T10:30:00+05:30 - Date-only:
2024-01-15(treated as UTC midnight) - RFC 2822:
Mon, 15 Jan 2024 10:30:00 +0000
- ISO 8601:
- Press Convert to get the epoch seconds and milliseconds.
Batch Conversion
The Batch tab accepts multiple timestamps, one per line. Paste a list and press Convert to process all of them at once. Each line shows:
- The original input
- Auto-detected precision (seconds or milliseconds)
- ISO 8601 date
- Relative time
Invalid lines are highlighted in red so you can identify and fix them easily.
How to Get the Current Unix Timestamp in Common Languages
// JavaScript — milliseconds
Date.now()
// JavaScript — seconds
Math.floor(Date.now() / 1000)
# Python — seconds (float)
import time; time.time()
# Python — seconds (integer)
import time; int(time.time())
# Bash/Shell
date +%s
// Go — seconds
import "time"
time.Now().Unix()
// Go — milliseconds
time.Now().UnixMilli()
// Java — milliseconds
System.currentTimeMillis()
// Java — seconds
System.currentTimeMillis() / 1000
-- MySQL
SELECT UNIX_TIMESTAMP();
-- PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW())::bigint;
-- SQLite
SELECT strftime('%s', 'now');
Common Epoch Reference Values
| Description | Epoch (seconds) | Date (UTC) |
|---|---|---|
| Unix epoch origin | 0 | Jan 1, 1970 00:00:00 |
| Y2K | 946684800 | Jan 1, 2000 00:00:00 |
| Billion-second milestone | 1000000000 | Sep 9, 2001 01:46:40 |
| Year 2038 problem limit | 2147483647 | Jan 19, 2038 03:14:07 |
| Two-billion-second milestone | 2000000000 | May 18, 2033 03:33:20 |
The Year 2038 Problem (Y2K38)
Many older systems store Unix timestamps as a signed 32-bit integer. The maximum value is 2,147,483,647, which represents January 19, 2038 at 03:14:07 UTC. When this counter overflows it wraps to a large negative number, causing date calculations to fail or produce dates in 1901.
Modern systems mitigate this by using 64-bit integers for timestamps. A signed 64-bit counter won’t overflow until approximately the year 292,277,026,596.
If you work with embedded systems, databases, or legacy code that might still use 32-bit timestamps, migrating to 64-bit storage before 2038 is critical.
Frequently Asked Questions
What is epoch time zero? The Unix epoch origin is midnight January 1, 1970, 00:00:00 UTC. All timestamps are counted from this point. Negative timestamps represent moments before 1970.
Why is the Unix epoch January 1, 1970? When Bell Labs engineers designed Unix in the early 1970s, they needed a fixed reference point that was recent but far enough in the past to represent historical dates. The year 1970 was a convenient round number close to the system’s creation date.
Does a Unix timestamp include timezone information? No. Unix timestamps are always defined relative to UTC. To display a timestamp in a local timezone, convert it to UTC first and then apply the timezone offset. This tool handles that automatically with the timezone selector.
What is the maximum Unix timestamp in 32 bits? A signed 32-bit integer can hold values up to 2,147,483,647, which is January 19, 2038 at 03:14:07 UTC. An unsigned 32-bit integer extends this to 4,294,967,295, corresponding to February 7, 2106.
How precise is a Unix timestamp?
Standard Unix timestamps have second-level precision. For millisecond precision, multiply by 1,000. For microsecond or nanosecond precision (used in high-performance systems), you need custom timestamp formats — tools like clock_gettime() in C or time.time_ns() in Python 3.7+.
Is my data sent to a server? No. All timestamp conversions happen entirely in your browser. No data leaves your device.