ToolPane
Blog

Unix Timestamp Converter

Convert between Unix timestamps and human-readable dates.

Current Unix Timestamp:
1777393305

Timestamp to Date

Date to Timestamp

What is a Unix Timestamp?

A Unix timestamp (or epoch time) counts the seconds since January 1, 1970 00:00:00 UTC. It's a simple, timezone-independent way to represent a point in time. Used universally in programming, databases, APIs, and logs. The current timestamp increases by 1 every second.

Working with Timestamps in Code

Here are common ways to work with Unix timestamps across different languages and tools.
// JavaScript
Date.now()                    // milliseconds
Math.floor(Date.now() / 1000) // seconds
new Date(1710432000 * 1000)   // timestamp to Date

// Python
import time
int(time.time())              // current timestamp
from datetime import datetime
datetime.fromtimestamp(1710432000)

// SQL
SELECT UNIX_TIMESTAMP();      -- MySQL
SELECT EXTRACT(EPOCH FROM NOW()); -- PostgreSQL

// CLI
date +%s                      # current timestamp

Seconds vs Milliseconds

Many APIs use milliseconds (13 digits, e.g., 1710432000000) while others use seconds (10 digits, e.g., 1710432000). JavaScript's Date.now() returns milliseconds. Python's time.time() returns seconds with decimal. This tool handles both formats automatically.

Frequently Asked Questions

What is the Year 2038 problem?
Unix timestamps stored as 32-bit signed integers overflow on January 19, 2038 at 03:14:07 UTC. After that, they wrap to negative numbers (1901). Most modern systems use 64-bit timestamps, which won't overflow for 292 billion years.
How do I convert a timestamp to a readable date?
Paste the timestamp into this tool. In code: JavaScript uses new Date(timestamp * 1000), Python uses datetime.fromtimestamp(timestamp). Remember to handle timezones — timestamps are UTC.
Why do timestamps differ between my server and browser?
Timestamps should be the same everywhere since they're UTC-based. Differences usually mean one system's clock is wrong, or you're confusing seconds vs milliseconds. Use NTP to sync clocks.

Guides

Related Tools