Unix Timestamp Converter

Convert between Unix timestamps and human-readable dates.

Current Unix Timestamp

Timestamp to Date

Date to Timestamp

What is Unix Time?

Unix time (also known as POSIX time or epoch time) is a system for tracking time as a running count of seconds since the Unix epoch: January 1, 1970 at 00:00:00 UTC. It was chosen as the standard reference point for the Unix operating system, and has since been adopted by virtually every programming language and operating system.

Unix timestamps are timezone-agnostic. The value 1700000000 means the same instant everywhere in the world. This makes them ideal for storing and comparing times across distributed systems, databases, and APIs without worrying about timezone conversion issues.

Epoch (zero point):

January 1, 1970, 00:00:00 UTC = 0

Notable Timestamps

Unix Epoch0
Y2K (Jan 1, 2000)946684800
1 Billion (Sep 9, 2001)1000000000
2020-01-011577836800
2 Billion (May 18, 2033)2000000000
Y2038 Problem (max 32-bit)2147483647

Common Use Cases

Code Examples

JavaScript
// Current timestamp (seconds)
const now = Math.floor(Date.now() / 1000);

// Timestamp to Date
const date = new Date(1700000000 * 1000);
console.log(date.toISOString());
// "2023-11-14T22:13:20.000Z"

// Date to timestamp
const ts = Math.floor(new Date('2024-01-01').getTime() / 1000);
// 1704067200
Python
import time
from datetime import datetime

# Current timestamp
now = int(time.time())

# Timestamp to datetime
dt = datetime.fromtimestamp(1700000000)
print(dt)  # 2023-11-14 22:13:20

# Datetime to timestamp
ts = int(datetime(2024, 1, 1).timestamp())
# 1704067200
Go
package main

import (
    "fmt"
    "time"
)

func main() {
    // Current timestamp
    now := time.Now().Unix()
    fmt.Println(now)

    // Timestamp to time
    t := time.Unix(1700000000, 0)
    fmt.Println(t.Format(time.RFC3339))
    // "2023-11-14T22:13:20Z"

    // Time to timestamp
    t2 := time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC)
    fmt.Println(t2.Unix()) // 1704067200
}
Bash / CLI
# Current timestamp
date +%s

# Timestamp to date (Linux)
date -d @1700000000

# Timestamp to date (macOS)
date -r 1700000000

# Date to timestamp (Linux)
date -d "2024-01-01" +%s

Frequently Asked Questions

What is the Year 2038 problem?
The Y2038 problem is similar to Y2K. Systems that store Unix timestamps as a signed 32-bit integer can only represent dates up to January 19, 2038 at 03:14:07 UTC (the value 2,147,483,647). After this moment, the integer overflows and wraps around to a large negative number, which represents December 13, 1901. Most modern systems now use 64-bit integers for timestamps, which can represent dates billions of years in the future.
Why does JavaScript use milliseconds instead of seconds?
JavaScript's Date.now() returns milliseconds since epoch for higher precision. This is common in browser environments where millisecond timing matters for animations, performance measurements, and event handling. Most server-side APIs expect seconds, so you typically divide by 1000: Math.floor(Date.now() / 1000). Our converter automatically detects millisecond timestamps (13+ digits) and converts them.
Should I store dates as timestamps or ISO 8601 strings?
Unix timestamps are better for computation (sorting, comparing, arithmetic) and storage efficiency (4-8 bytes vs 20+ bytes). ISO 8601 strings (like "2024-01-15T09:30:00Z") are better for human readability and API responses. Most databases support both formats natively. A common pattern is to store timestamps internally and convert to ISO 8601 for API responses.
Do Unix timestamps account for leap seconds?
No, Unix timestamps do not account for leap seconds. POSIX time explicitly ignores them, so every day is exactly 86,400 seconds. When a leap second occurs, the Unix timestamp either repeats a second or jumps. This simplification makes timestamps easy to work with but means they are not perfectly synchronized with astronomical time (UTC). For most applications, this difference is negligible.

Related Tools

Track response times for your APIs

UptimeSignal monitors your endpoints every minute and tracks response times over time. Get alerted the moment your API slows down or goes offline.

Start monitoring free →

25 monitors free. No credit card required.