Unix Timestamp Converter
Convert Unix epoch time to a human date and back, in seconds or milliseconds, for any timezone.
Current Unix time
Click a value to copyTimestamp → date
Date → timestamp
How to use the Unix Timestamp Converter
- Paste a timestamp. Seconds, milliseconds, microseconds and nanoseconds are detected from the number of digits.
- Read it as UTC, your local time, ISO 8601, RFC 2822 and relative time, or pick another timezone.
- To go the other way, choose a date, time and timezone to get the timestamp in seconds and milliseconds.
- Click any value to copy it.
What is Unix time?
Unix time — also called epoch time or POSIX time — counts the seconds that have elapsed since 00:00:00 UTC on 1 January 1970, ignoring leap seconds. Because it is a single number with no timezone, it is the simplest reliable way to store, sort and compare moments in time across servers, databases and programming languages. You will find Unix timestamps in log files, JWT exp and iat claims, HTTP caching headers, database columns, analytics events and API responses.
Seconds, milliseconds, microseconds or nanoseconds?
| Digits (today) | Unit | Typical source |
|---|---|---|
| 10 | Seconds | PHP time(), Python int(time.time()), MySQL UNIX_TIMESTAMP(), JWT claims |
| 13 | Milliseconds | JavaScript Date.now(), Java System.currentTimeMillis(), Kafka, Elasticsearch |
| 16 | Microseconds | PostgreSQL internals, Python time.time_ns() // 1000, BigQuery |
| 19 | Nanoseconds | Go time.Now().UnixNano(), Prometheus, OpenTelemetry |
The converter detects the unit from the number of digits; choose a unit manually if your timestamp is very old or far in the future.
Get the current timestamp in code
// JavaScript / Node.js
Math.floor(Date.now() / 1000)
# Python
import time; int(time.time())
// PHP
time();
// Go
time.Now().Unix()
// Java
Instant.now().getEpochSecond()
# Bash
date +%s
-- MySQL / PostgreSQL
SELECT UNIX_TIMESTAMP(); -- MySQL
SELECT EXTRACT(EPOCH FROM NOW()); -- PostgreSQL
Convert a timestamp to a date in code
// JavaScript
new Date(1767225600 * 1000).toISOString()
# Python
from datetime import datetime, timezone
datetime.fromtimestamp(1767225600, tz=timezone.utc)
// PHP
gmdate('c', 1767225600);
# Bash (GNU date)
date -u -d @1767225600
Timezones and the year 2038 problem
A Unix timestamp never has a timezone; it only gets one when you format it as a calendar date. Store timestamps (or ISO 8601 strings with an offset) and convert to the user’s timezone at display time. Systems that store seconds in a signed 32-bit integer will overflow at 2147483647 — 03:14:07 UTC on 19 January 2038 — so use 64-bit integers for anything long-lived.
Need to know when a scheduled job will next run? Try the Cron Expression Parser.
Frequently asked questions
What is a Unix timestamp?
Is my timestamp in seconds or milliseconds?
Date.now() and Java System.currentTimeMillis() return milliseconds; PHP time() and Python int(time.time()) return seconds.Does a Unix timestamp have a timezone?
What is the year 2038 problem?
How do I get the current timestamp in code?
Math.floor(Date.now()/1000), Python int(time.time()), PHP time(), Go time.Now().Unix(), Bash date +%s, MySQL UNIX_TIMESTAMP().Last updated . Launched with auto unit detection, timezone conversion and live epoch clock.
Building something that needs live data?
ProWebLook APIs validate phone numbers, check WhatsApp accounts, verify emails and geolocate IPs. Try every endpoint in the browser, then grab a free API key.