~ / developer / timestamp-converter

⏱ Unix Timestamp Converter

Epoch ↔ human date in your time zone and UTC. Seconds, milliseconds, microseconds and nanoseconds are detected automatically from the number of digits.

now — click to copy
seconds
—
milliseconds
—
local time
—
timestamp → date
Enter a timestamp
date → timestamp
Pick a date

How to use the epoch converter

What is a Unix timestamp?

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC, not counting leap seconds. Because it's a single number that doesn't depend on time zones or daylight saving time, it's the standard way to store moments in databases, logs, APIs, cookies and JWTs. The same timestamp shows up as different wall-clock times around the world — 1759622400 is midnight UTC on October 5, 2025, but 8:00 PM the previous evening in New York — so it's worth checking both local time and UTC.

Time zones when converting a date to epoch

The same "2025-10-05 09:00" produces different timestamps depending on which time zone it refers to. Pick UTC when the value comes from server logs or a database that stores UTC; pick your local time (or a specific US zone) when you're converting a time a user saw on screen. US zones automatically account for daylight saving time: 9:00 AM in New York is UTC−4 in summer (EDT) and UTC−5 in winter (EST).

Seconds, milliseconds, microseconds or nanoseconds?

Digits (integer part)UnitExample (2025-10-05 00:00 UTC)
up to 11seconds (s)1759622400
12–14milliseconds (ms)1759622400000
15–17microseconds (μs)1759622400000000
18 or morenanoseconds (ns)1759622400000000000

JavaScript's Date.now() and Java's System.currentTimeMillis() return milliseconds. The shell's date +%s, Python's int(time.time()), PHP's time() and JWT claims use seconds. Go's time.Now().UnixNano() is nanoseconds. Negative values (before 1970) and decimals are supported.

Get the current epoch time in code

LanguageSecondsMilliseconds
JavaScriptMath.floor(Date.now() / 1000)Date.now()
Pythonint(time.time())time.time_ns() // 1_000_000
Bash / Linuxdate +%sdate +%s%3N
SQL (PostgreSQL)extract(epoch from now())—
Excel / Sheets → date=A1/86400+DATE(1970,1,1) (UTC; format the cell as date/time)

Detection is by digit count, so unusual values — for example a millisecond timestamp from before March 1973 — can be read as a different unit. Always check the unit label next to the result. Microseconds and nanoseconds are rounded to milliseconds for display. Everything runs locally in your browser.

FAQ

Why is my converted time off by several hours?
You are probably mixing up UTC and local time. A Unix timestamp is always UTC; your local time adds or subtracts your offset (for example UTC−4 for New York in summer). Compare the Local and UTC rows side by side.
Why does my date show 1970 or the year 57000?
Seconds and milliseconds got mixed up. A millisecond value treated as seconds lands tens of thousands of years in the future; a seconds value treated as milliseconds lands in January 1970. Check how many digits the number has.
How do I convert a Unix timestamp in Excel or Google Sheets?
For seconds use =A1/86400+DATE(1970,1,1) and format the cell as date/time. That gives UTC; subtract hours for US time, e.g. -5/24 for EST. For milliseconds divide by 86400000 instead.
What is the Year 2038 problem?
Systems that store seconds in a signed 32-bit integer overflow at 2147483647, which is 2038-01-19 03:14:07 UTC, and wrap around to 1901. Modern 64-bit systems are fine, but old embedded devices and some database columns still need checking.
Do Unix timestamps include leap seconds?
No. Unix time assumes every day has exactly 86,400 seconds, so leap seconds are not counted. That is why it maps cleanly to calendar dates.

Related tools