Time calculated when this page loaded — enable JavaScript for live updates.

Unix Timestamp Converter

Convert Unix timestamps to dates and back. Typing converts locally; submitting a timestamp also works without JavaScript and sends that value to this site.

Current Unix time

1792542858

Timestamp → Date

Paste a Unix timestamp and choose its unit.

Auto estimates the unit. For older millisecond timestamps such as 946684800000 (1 January 2000), choose milliseconds.

UTC
—
Your time
—
ISO 8601
—
Interpreted as
—

Date → Timestamp

Pick a date, time, and zone to get its Unix timestamp.

Timestamp (seconds)
—
Timestamp (ms)
—

Common questions

What is a Unix timestamp?
The number of seconds elapsed since 00:00:00 UTC on 1 January 1970 (the Unix epoch), not counting leap seconds.
Seconds or milliseconds?
Unix time is defined in seconds. JavaScript and some APIs use milliseconds. Auto estimates the unit from the size of the number; it cannot identify every timestamp correctly. Choose the unit explicitly when you know it.

Get the current Unix time in code

// JavaScript
Math.floor(Date.now() / 1000)

# Python
import time
int(time.time())

// PHP
time();

// Java
Instant.now().getEpochSecond()

// Go
time.Now().Unix()

-- MySQL
SELECT UNIX_TIMESTAMP();

-- PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW())::bigint;

# Shell
date +%s

Turn a timestamp back into a date

// JavaScript
new Date(1798761600 * 1000).toISOString()

# Python
from datetime import datetime, timezone
datetime.fromtimestamp(1798761600, tz=timezone.utc)

# Shell (Linux)
date -u -d @1798761600

# Shell (macOS)
date -u -r 1798761600

Each of these gives 1 January 2027, 00:00:00 UTC.

The year 2038 problem

Software that stores Unix time as a signed 32-bit integer runs out of room at 2,147,483,647, which is 03:14:07 UTC on 19 January 2038. One second later the number wraps around to negative and reads as 13 December 1901. Current operating systems and languages use 64-bit timestamps, which moves the limit billions of years away, but embedded devices, old file formats and database columns declared as 32-bit integers can still be caught out.