Unix Timestamp Converter
Convert Unix timestamps to human-readable dates or dates to timestamps. Supports both seconds and milliseconds formats.
Current Unix Timestamp
1770307644
2026-02-05T16:07:24.050Z
About Unix Timestamps
Unix timestamps count seconds since January 1, 1970 (UTC), known as the Unix Epoch. JavaScript typically uses milliseconds (13 digits), while most APIs use seconds (10 digits). This tool auto-detects the format.
What is a Unix timestamp?
A Unix timestamp (or epoch time) is the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC. This moment is known as the Unix Epoch.
1704067200 = Monday, January 1, 2024, 00:00:00 UTCUnix timestamps are widely used because they’re:
- Timezone-independent - A timestamp represents the same moment everywhere
- Easy to compare - Simple integer comparison
- Compact - Just a number, no formatting
Seconds vs milliseconds
Unix timestamps traditionally use seconds (10 digits):
1704067200JavaScript timestamps use milliseconds (13 digits):
1704067200000This tool auto-detects which format you’re using based on the number of digits.
The Year 2038 problem
32-bit systems store Unix timestamps as signed integers, which will overflow on January 19, 2038, at 03:14:07 UTC. The timestamp will wrap around to negative values, potentially causing widespread issues.
Maximum 32-bit signed: 2147483647 = 2038-01-19 03:14:07Modern 64-bit systems don’t have this limitation, but legacy systems and embedded devices may be affected.
Working with timestamps in code
JavaScript:
// Current timestamp (milliseconds)
Date.now(); // 1704067200000
// Current timestamp (seconds)
Math.floor(Date.now() / 1000); // 1704067200
// Timestamp to date
new Date(1704067200 * 1000);
// Date to timestamp
new Date("2024-01-01").getTime() / 1000;Python:
import time
from datetime import datetime
# Current timestamp
time.time() # 1704067200.123
# Timestamp to date
datetime.fromtimestamp(1704067200)
# Date to timestamp
datetime(2024, 1, 1).timestamp()PHP:
// Current timestamp
time();
// Timestamp to date
date('Y-m-d H:i:s', 1704067200);
// Date to timestamp
strtotime('2024-01-01');Common timestamp values
| Timestamp | Date |
|---|---|
| 0 | 1970-01-01 00:00:00 (Unix Epoch) |
| 1000000000 | 2001-09-09 01:46:40 |
| 1234567890 | 2009-02-13 23:31:30 |
| 1500000000 | 2017-07-14 02:40:00 |
| 2000000000 | 2033-05-18 03:33:20 |
| 2147483647 | 2038-01-19 03:14:07 (32-bit limit) |
Timestamps in APIs and databases
JSON APIs often use timestamps for dates because they’re unambiguous:
{
"created_at": 1704067200,
"expires_at": 1704153600
}Databases may store timestamps as integers or dedicated datetime types:
-- Integer storage
SELECT * FROM sessions WHERE expires_at > UNIX_TIMESTAMP();
-- MySQL datetime
SELECT * FROM sessions WHERE expires_at > NOW();How this tool works
Enter a Unix timestamp to convert it to a human-readable date, or select a date and time to get its timestamp. The tool shows both seconds and milliseconds formats, ISO 8601, and relative time. Powered by a QuantCDN Edge Function.