Unix Epoch Timestamp Converter — Convert Unix Time to Date Online
Convert Unix epoch timestamps to human-readable dates and dates back to epoch time instantly. This free online Unix timestamp converter supports both seconds and milliseconds, auto-detects format, and displays results in UTC, local time, and ISO 8601. Essential for developers, system administrators, and anyone working with POSIX time, server logs, or API responses. See also Time Converter, Date Calculator, and Time Zone Converter.
Current Unix Epoch Time
Epoch → Human-Readable Date
Date → Epoch Timestamp
What Is Unix Epoch Time?
Unix epoch time (also called POSIX time, Unix timestamp, or epoch seconds) is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC — a reference point known as the Unix epoch. This single-integer representation of date and time is timezone-independent, making it the universal standard for storing timestamps in databases, APIs, server logs, and operating systems worldwide.
Every programming language — JavaScript, Python, Java, PHP, C, Ruby, Go, Rust — uses epoch time internally for date arithmetic, time comparisons, and scheduling. When you see a number like 1700000000 in a database column or API response, that is a Unix timestamp representing November 14, 2023 at 22:13:20 UTC.
How to Convert Epoch Timestamp to Human-Readable Date
- Enter the Unix timestamp (epoch seconds or milliseconds) in the input field above.
- The converter auto-detects whether your input is in seconds (10 digits) or milliseconds (13 digits).
- Click "Convert to Date" to see the result in UTC, local time, and ISO 8601 format.
- Use the Copy button to copy the converted date to your clipboard.
To convert a date string back to a Unix timestamp, enter any standard date format (ISO 8601, RFC 2822, or natural language like "Jan 15 2024 10:30 AM") in the second converter and click "Convert to Epoch."
Epoch Conversion Formula
// Epoch to Date
Date = new Date(epoch_seconds × 1000)
// Date to Epoch
Epoch (seconds) = Math.floor(Date.getTime() / 1000)
Epoch (milliseconds) = Date.getTime()
// Time difference between two timestamps
Duration (seconds) = epoch2 - epoch1
Conversion Examples
Example 1: Epoch to Date
Input: 1700000000
Output: Tue, 14 Nov 2023 22:13:20 GMT
ISO 8601: 2023-11-14T22:13:20.000Z
Example 2: Date to Epoch
Input: 2024-06-15T12:00:00Z
Output: 1718452800 (seconds)
Output: 1718452800000 (milliseconds)
Example 3: Milliseconds Detection
Input: 1700000000000 (13 digits = milliseconds)
Output: Same as 1700000000 seconds
Unix Timestamp Reference Table
| Event / Milestone | Epoch (seconds) | Date (UTC) |
|---|---|---|
| Unix Epoch (start) | 0 | Jan 1, 1970 00:00:00 |
| 1 Billion seconds | 1000000000 | Sep 9, 2001 01:46:40 |
| 1.5 Billion seconds | 1500000000 | Jul 14, 2017 02:40:00 |
| 1.7 Billion seconds | 1700000000 | Nov 14, 2023 22:13:20 |
| 1.8 Billion seconds | 1800000000 | Jan 15, 2027 08:00:00 |
| 2 Billion seconds | 2000000000 | May 18, 2033 03:33:20 |
| Y2K38 overflow limit | 2147483647 | Jan 19, 2038 03:14:07 |
| Max 64-bit epoch | 9223372036854775807 | ~292 billion years |
Get Current Epoch Time in Programming Languages
| Language | Get Current Epoch | Convert Epoch to Date |
|---|---|---|
| JavaScript | Math.floor(Date.now()/1000) | new Date(epoch * 1000) |
| Python | import time; int(time.time()) | datetime.fromtimestamp(epoch) |
| Java | System.currentTimeMillis()/1000 | new Date(epoch * 1000L) |
| PHP | time() | date("Y-m-d H:i:s", $epoch) |
| C# | DateTimeOffset.UtcNow.ToUnixTimeSeconds() | DateTimeOffset.FromUnixTimeSeconds(epoch) |
| Ruby | Time.now.to_i | Time.at(epoch) |
| Go | time.Now().Unix() | time.Unix(epoch, 0) |
| Bash/Shell | date +%s | date -d @epoch |
| SQL (MySQL) | UNIX_TIMESTAMP() | FROM_UNIXTIME(epoch) |
| SQL (PostgreSQL) | EXTRACT(EPOCH FROM NOW()) | TO_TIMESTAMP(epoch) |
Technical Details — Seconds vs Milliseconds
Different systems use different precision for epoch timestamps. Unix/Linux systems, Python, PHP, and most APIs use seconds (10-digit number). JavaScript, Java, and some modern APIs use milliseconds (13-digit number). This converter auto-detects the format: if the absolute value exceeds 10 trillion, it treats the input as milliseconds; otherwise as seconds.
| Format | Digits | Example | Used By |
|---|---|---|---|
| Seconds | 10 | 1700000000 | Unix, Python, PHP, C, MySQL |
| Milliseconds | 13 | 1700000000000 | JavaScript, Java, Dart |
| Microseconds | 16 | 1700000000000000 | PostgreSQL, some APIs |
| Nanoseconds | 19 | 1700000000000000000 | Go, Rust, high-precision systems |
The Year 2038 Problem (Y2K38)
Systems storing Unix time as a signed 32-bit integer will overflow on January 19, 2038 at 03:14:07 UTCwhen the value reaches 2,147,483,647 (2³¹ - 1). The counter wraps to a large negative number, causing the date to jump backward to December 13, 1901. This is analogous to the Y2K bug but affects embedded systems, IoT devices, and legacy databases that still use 32-bit time storage.
Modern 64-bit operating systems (Linux, macOS, Windows) already use 64-bit time, extending the range to approximately 292 billion years. However, file formats, network protocols, and embedded firmware may still be vulnerable. Developers should audit timestamp storage and ensure all new code uses 64-bit epoch values.
Why January 1, 1970 Was Chosen as the Epoch
The Unix epoch was selected as a practical engineering decision at Bell Labs in the late 1960s. The original PDP-7 Unix system used a 32-bit counter incrementing every 1/60th of a second, which would overflow in about 2.5 years. When Unix was rewritten for the PDP-11, the team chose whole seconds from a round date — January 1, 1970 — giving the 32-bit counter a 136-year range (1901-2038). The date has no astronomical or historical significance; it was simply the nearest round year to when Unix was being developed.
Common Use Cases for Epoch Timestamps
- Database storage — Storing dates as integers is faster to index and compare than datetime strings
- API responses — REST and GraphQL APIs often return created_at/updated_at as epoch seconds
- Server logs — Nginx, Apache, and system logs use epoch timestamps for precise event ordering
- JWT tokens — JSON Web Tokens use epoch seconds for iat (issued at) and exp (expiration) claims
- Cron jobs — Scheduling systems compare current epoch against target epoch for task execution
- Cache invalidation — TTL (time-to-live) values are computed by adding seconds to current epoch
- Git commits — Git stores author and committer timestamps as epoch seconds
- File systems — File creation, modification, and access times are stored as epoch values
Epoch Time and Time Zones
A key advantage of Unix epoch time is that it is timezone-independent. The same epoch value represents the same absolute moment in time regardless of where you are. When you convert an epoch to a local date, the timezone offset is applied during display — the stored value never changes. This eliminates ambiguity caused by daylight saving time transitions, timezone abbreviation conflicts, and locale-specific date formats.
For example, epoch 1700000000 is always November 14, 2023 22:13:20 UTC. In New York (EST, UTC-5), that displays as 5:13 PM. In Tokyo (JST, UTC+9), it displays as 7:13 AM the next day. The underlying epoch value is identical — only the human-readable representation changes.
Frequently Asked Questions
What is a Unix timestamp?
A Unix timestamp (also called epoch time, POSIX time, or Unix time) is a single integer representing the number of seconds since January 1, 1970 00:00:00 UTC. It provides a universal, timezone-independent way to record when an event occurred.
How do I convert epoch time to a readable date?
Enter the epoch value in the converter above and click "Convert to Date." Programmatically, multiply seconds by 1000 and pass to your language's Date constructor. In JavaScript: new Date(1700000000 * 1000) gives "Tue Nov 14 2023."
What is the difference between epoch seconds and milliseconds?
Epoch seconds is a 10-digit number (e.g., 1700000000) used by Unix, Python, and PHP. Epoch milliseconds is a 13-digit number (e.g., 1700000000000) used by JavaScript and Java. Multiply seconds by 1000 to get milliseconds, or divide milliseconds by 1000 to get seconds.
Does Unix time handle leap seconds?
No. Unix time treats every day as exactly 86,400 seconds and ignores leap seconds entirely. When a leap second occurs, Unix clocks either repeat a second (step) or smear the adjustment over a longer period (slew). This means Unix time can differ from TAI (International Atomic Time) by up to 37 seconds as of 2024.
Can epoch time be negative?
Yes. Negative epoch values represent dates before January 1, 1970. For example, epoch -86400 is December 31, 1969. Systems using signed 32-bit integers can represent dates back to December 13, 1901 (epoch -2147483648).
What is the maximum Unix timestamp?
On 32-bit systems: 2,147,483,647 (January 19, 2038 03:14:07 UTC). On 64-bit systems: 9,223,372,036,854,775,807 (approximately 292 billion years from now). All modern operating systems use 64-bit time.
How do I get the current Unix timestamp?
In a terminal: run "date +%s" on Linux/macOS. In JavaScript: Math.floor(Date.now()/1000). In Python: import time; int(time.time()). The live counter at the top of this page also shows the current epoch updating every second.