Unix Timestamp Converter
Convert Unix time (epoch time) to a readable date, or a date back to a timestamp — in UTC, your local timezone, or any timezone in the world. Everything below runs in your browser; nothing you enter is sent anywhere.
Timestamp → Date
Date → Timestamp
Seconds, at a glance
| 1 minute | 60 seconds |
| 1 hour | 3,600 seconds |
| 1 day | 86,400 seconds |
| 1 week | 604,800 seconds |
| 30 days | 2,592,000 seconds |
| 365 days | 31,536,000 seconds |
| Unix epoch (0) | January 1, 1970, 00:00:00 UTC |
| 32-bit signed overflow (2,147,483,647) | January 19, 2038, 03:14:07 UTC |
Code snippets
Getting the current timestamp, and converting one back to a date, in a few common languages.
JavaScript
// Current timestamp (ms and seconds)
Date.now();
Math.floor(Date.now() / 1000);
// Timestamp to date
new Date(1735689600 * 1000).toISOString();
Python
import time
time.time() # current timestamp (float seconds)
import datetime
datetime.datetime.fromtimestamp(1735689600, tz=datetime.timezone.utc)
PHP
time(); // current timestamp (seconds)
date('Y-m-d H:i:s', 1735689600); // timestamp to date (server timezone)
gmdate('Y-m-d H:i:s', 1735689600); // timestamp to date (UTC)
Java
Instant.now().getEpochSecond();
Instant.ofEpochSecond(1735689600)
.atZone(ZoneOffset.UTC);
SQL (MySQL / PostgreSQL)
-- MySQL
SELECT UNIX_TIMESTAMP();
SELECT FROM_UNIXTIME(1735689600);
-- PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW());
SELECT TO_TIMESTAMP(1735689600);
Bash
date +%s # current timestamp
date -u -d @1735689600 # timestamp to UTC date (GNU/Linux)
date -u -r 1735689600 # timestamp to UTC date (macOS/BSD)
Frequently asked questions
What is a Unix timestamp?
A Unix timestamp (also called epoch time) is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC, not counting leap seconds. It's a single number that represents a specific moment in time regardless of timezone, which is why it's used so widely in programming, databases, and APIs.
Why does Unix time start at January 1, 1970?
That date was chosen somewhat arbitrarily by early Unix developers as a convenient reference point ("the epoch") close to when Unix itself was being developed. Once systems and file formats were built around it, it stuck as the universal standard.
Seconds, milliseconds, microseconds — what's the difference?
They're all Unix time, just at different resolutions. Seconds is the
original Unix standard (10 digits today). JavaScript's
Date.now() and many web APIs use milliseconds (13
digits). Some databases and high-precision logging systems use
microseconds (16 digits) or nanoseconds (19 digits). This tool
auto-detects which one you've pasted in based on how many digits it
has.
What is the Year 2038 problem?
Systems that store Unix time as a signed 32-bit integer can only count up to 2,147,483,647 seconds, which runs out at 03:14:07 UTC on January 19, 2038. After that instant, those systems overflow and can wrap around to a negative number, misreading the date. Most modern 64-bit systems have already moved past this limit, but some older or embedded software is still affected.
Does this tool account for timezones?
Yes. A Unix timestamp itself has no timezone — it's the same instant everywhere. The timezone selector controls how that instant is displayed (in the Timestamp → Date tool) or how a wall-clock date and time should be interpreted before converting it to a timestamp (in the Date → Timestamp tool).
Does Unix time include leap seconds?
No. Unix time assumes every day is exactly 86,400 seconds and simply ignores leap seconds, repeating or skipping a second when one occurs. This keeps the arithmetic simple, at the cost of Unix time drifting very slightly from true astronomical time over the long run.