Free Online Timestamp Converter
Convert between Unix timestamp and human-readable date/time. Supports multiple timezones, ISO 8601 format, and real-time conversion.
Full Date & Time
ISO Format
Readable Format
Unix Timestamp (Seconds)
Unix Timestamp (Milliseconds)
Current Time (Updates every second)
Time is based on your device's system clock. For internet-standard time, ensure your system clock is synchronized.
Key Features
Timezone Support
Convert timestamps across multiple timezones including local time and UTC.
Bidirectional Conversion
Convert Unix timestamp to date and vice versa with ease.
Real-time Updates
See current time in different formats and timezones instantly.
Multiple Formats
View results in ISO format, readable format, and full datetime.
Code Examples
JavaScript / TypeScript
// Get current timestamp
const seconds = Math.floor(Date.now() / 1000);
const milliseconds = Date.now();
// Convert timestamp to date
const date = new Date(1704067200 * 1000);
console.log(date.toISOString()); // "2024-01-01T00:00:00.000Z"
// Format date in specific timezone
const options = { timeZone: 'Asia/Shanghai' };
console.log(date.toLocaleString('en-US', options));
Python
import time
from datetime import datetime, timezone
# Get current timestamp
seconds = int(time.time())
milliseconds = int(time.time() * 1000)
# Convert timestamp to date
date = datetime.fromtimestamp(1704067200, tz=timezone.utc)
print(date.strftime('%Y-%m-%d %H:%M:%S'))
# Parse date string to timestamp
date_str = "2024-01-01 08:00:00"
dt = datetime.strptime(date_str, "%Y-%m-%d %H:%M:%S")
timestamp = int(dt.timestamp())
Java
import java.time.*;
import java.time.format.DateTimeFormatter;
// Get current timestamp
long seconds = Instant.now().getEpochSecond();
long milliseconds = System.currentTimeMillis();
// Convert timestamp to date
Instant instant = Instant.ofEpochSecond(1704067200);
ZonedDateTime zdt = instant.atZone(ZoneId.of("Asia/Shanghai"));
System.out.println(zdt.format(DateTimeFormatter.ISO_ZONED_DATE_TIME));
// Parse date string to timestamp
LocalDateTime ldt = LocalDateTime.parse("2024-01-01T08:00:00");
long timestamp = ldt.atZone(ZoneId.of("Asia/Shanghai")).toEpochSecond();
Frequently Asked Questions
What is a Unix timestamp?
What's the difference between seconds and milliseconds?
How accurate is the conversion?
How do I convert Unix to Date?
How do I convert Date to Unix?
Why do I need timezone support?
Example: Common Unix timestamps
0 = 1970-01-01 00:00:00 UTC (Epoch) 1000000000 = 2001-09-09 01:46:40 UTC 1704067200 = 2024-01-01 00:00:00 UTC 2000000000 = 2033-05-18 03:33:20 UTC
Example: Convert timestamp to date
Input: 1704067200
In UTC: 2024-01-01 00:00:00
In New York (EST): 2023-12-31 19:00:00
In Shanghai (CST): 2024-01-01 08:00:00
Example: Date to timestamp
Date: 2024-06-15 12:30:00 UTC
Unix (seconds): 1718454600
Unix (milliseconds): 1718454600000
How do I get the current timestamp in JavaScript / Python?
JavaScript: Math.floor(Date.now() / 1000) for seconds, Date.now() for milliseconds.
Python: int(time.time()) for seconds, int(time.time() * 1000) for milliseconds.
PHP: $timestamp = time();
How do I convert timestamp to date in code?
JavaScript: new Date(timestamp * 1000).toISOString()
Python: datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S')