Developer tool
A Unix timestamp is the number of seconds since the epoch — 00:00:00 UTC on 1 January 1970 — and it is the format almost every database, log file, JWT, cookie expiry, and HTTP cache header uses internally. This page gives you a live current timestamp, two-way conversion between epoch and human-readable dates, and copy-pasteable snippets for the languages you actually use. Paste any 10-digit (seconds) or 13-digit (milliseconds) value and we auto-detect the unit; pick a date and we hand you back seconds, milliseconds, ISO 8601, and RFC 2822 in one step.
Live
Current Unix timestamp (sec)
----------
Milliseconds
-------------
Timestamp → Date
Enter a Unix timestamp to convert.
Date → Timestamp
Pick a date and time to convert.
Snippets
Python
Current timestamp
import time time.time() # seconds (float)
Timestamp → date
from datetime import datetime, timezone datetime.fromtimestamp(ts, tz=timezone.utc)
Date → timestamp
int(datetime(2026, 1, 1, tzinfo=timezone.utc).timestamp())
JavaScript
Current timestamp
Math.floor(Date.now() / 1000) // seconds Date.now() // milliseconds
Timestamp → date
new Date(ts * 1000).toISOString()
Date → timestamp
Math.floor(new Date('2026-01-01T00:00:00Z').getTime() / 1000)Bash
Current timestamp
date +%s
Timestamp → date
date -u -d @1700000000 # GNU date -u -r 1700000000 # BSD/macOS
Date → timestamp
date -u -d '2026-01-01' +%s # GNU
Go
Current timestamp
time.Now().Unix()
Timestamp → date
time.Unix(ts, 0).UTC()
Date → timestamp
time.Date(2026, 1, 1, 0, 0, 0, 0, time.UTC).Unix()
PostgreSQL
Current timestamp
SELECT EXTRACT(EPOCH FROM NOW())::bigint;
Timestamp → date
SELECT to_timestamp(1700000000) AT TIME ZONE 'UTC';
Date → timestamp
SELECT EXTRACT(EPOCH FROM TIMESTAMP '2026-01-01 00:00:00')::bigint;
MySQL
Current timestamp
SELECT UNIX_TIMESTAMP();
Timestamp → date
SELECT FROM_UNIXTIME(1700000000);
Date → timestamp
SELECT UNIX_TIMESTAMP('2026-01-01 00:00:00');Questions