Free & Instant
Unix Timestamp Converter
Convert epoch timestamps to human-readable dates — and back — with full timezone support, live clock, and developer code snippets.
Current Unix Timestamp
—
ms: —
—
Convert Timestamp to Date
UTC Date & Time
—
Local (Selected TZ)
—
ISO 8601
—
RFC 2822
—
Seconds Timestamp
—
Milliseconds Timestamp
—
—
—
—
—
—
World Timezones
Convert Date to Unix Timestamp
Unix (Seconds)
—
Unix (Milliseconds)
—
UTC Equivalent
—
ISO 8601
—
Time Unit Converter
Enter a value in any field to convert across all units instantly.
Recent Conversions
Unix Timestamp Cheat Sheet
Common reference values developers reach for every day.
Unix Epoch (0)
1970-01-01 00:00:00 UTC
1 Billion Seconds
2001-09-09 01:46:40 UTC
Y2K38 (32-bit max)
2038-01-19 03:14:07 UTC
10 Digits → Seconds
e.g. 1700000000
13 Digits → Milliseconds
e.g. 1700000000000
Seconds per Day
86,400
Seconds per Year
31,536,000
ISO 8601 Format
YYYY-MM-DDTHH:mm:ssZ
Developer Code Snippets
Ready-to-paste code for common Unix timestamp operations.
// Current timestamp (seconds)
const nowSec = Math.floor(Date.now() / 1000);
// Current timestamp (milliseconds)
const nowMs = Date.now();
// Unix timestamp → Date object
const date = new Date(nowSec * 1000);
// Date object → Unix timestamp
const ts = Math.floor(new Date('2024-01-01T00:00:00Z').getTime() / 1000);
// Format a timestamp to local string
const local = new Date(nowMs).toLocaleString('en-US', { timeZone: 'America/New_York' });
// ISO 8601 string
const iso = new Date(nowMs).toISOString();
// Current Unix timestamp (seconds)
$ts = time();
// Current timestamp (milliseconds)
$ms = (int)(microtime(true) * 1000);
// Unix timestamp → formatted date (UTC)
$utc = gmdate('Y-m-d H:i:s', $ts);
// Unix timestamp → formatted date (specific TZ)
$dt = new DateTime('@' . $ts);
$dt->setTimezone(new DateTimeZone('America/New_York'));
$str = $dt->format('Y-m-d H:i:s T');
// Date string → Unix timestamp
$ts2 = strtotime('2024-01-01 00:00:00');
// ISO 8601
$iso = $dt->format(DateTime::ATOM);
import time
from datetime import datetime, timezone
# Current Unix timestamp (seconds)
ts = int(time.time())
# Timestamp → UTC datetime
dt_utc = datetime.fromtimestamp(ts, tz=timezone.utc)
# Timestamp → local datetime
dt_local = datetime.fromtimestamp(ts)
# Date string → Unix timestamp
ts2 = int(datetime.fromisoformat('2024-01-01T00:00:00+00:00').timestamp())
# Format as ISO 8601
iso = dt_utc.isoformat()
# With pytz for timezone support
import pytz
ny = pytz.timezone('America/New_York')
dt_ny = datetime.fromtimestamp(ts, tz=ny)
# Current Unix timestamp
date +%s
# Current timestamp in milliseconds
date +%s%3N
# Timestamp → human-readable (UTC)
date -ud @1700000000
# Timestamp → human-readable (local TZ)
date -d @1700000000
# Date string → Unix timestamp
date -d '2024-01-01 00:00:00 UTC' +%s
# macOS variant
date -r 1700000000
gdate -d @1700000000 # GNU date via brew
Frequently Asked Questions
Everything you need to know about Unix timestamps and epoch conversion.
What is a Unix timestamp?
A Unix timestamp (also known as epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970, at 00:00:00 Coordinated Universal Time (UTC). It is a standardized, timezone-independent way to represent moments in time and is used in virtually every programming language and operating system.
What is the difference between seconds and millisecond timestamps?
A standard Unix timestamp in seconds has 10 digits (e.g., 1700000000). A millisecond-precision timestamp has 13 digits (e.g., 1700000000000). JavaScript's Date.now() returns milliseconds by default, whereas most server-side languages and Unix/Linux commands return seconds. This tool auto-detects which format you've entered.
What is the Unix epoch (time zero)?
The Unix epoch is January 1, 1970, 00:00:00 UTC, represented as timestamp 0. Any timestamp before this date is a negative number. The epoch was chosen when early Unix systems were being designed in the late 1960s.
What is the Year 2038 problem?
On 32-bit systems, the maximum Unix timestamp is 2,147,483,647 (January 19, 2038, 03:14:07 UTC). After this moment, a signed 32-bit integer overflows and wraps to a large negative value, causing potential bugs. Modern 64-bit systems are unaffected and can represent timestamps billions of years into the future.
How do I convert a timestamp to a specific timezone?
Select your desired timezone from the dropdown in the converter above. The tool will display the timestamp converted to that timezone alongside UTC. Internally, the conversion is done by PHP's DateTimeZone class, which uses the IANA timezone database.
What does ISO 8601 mean?
ISO 8601 is an international standard for representing dates and times. It uses the format YYYY-MM-DDTHH:mm:ssZ (e.g., 2024-11-14T22:13:20+00:00). The "T" separates date from time, and "Z" or ±HH:mm denotes the UTC offset. It is the recommended format for APIs, databases, and data interchange.