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
Timestamp → Date
Paste a Unix timestamp and choose its unit.
Enter a valid Unix timestamp in seconds or 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?
Seconds or milliseconds?
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.