Every dayDate & Time

Unix Timestamp
converter.

Convert epoch seconds or milliseconds to a date in any time zone, and back again.

How it's worked out

A Unix timestamp is the number of seconds since the Unix epoch, midnight UTC on January 1, 1970. POSIX defines it so that every day has exactly 86,400 seconds; leap seconds are left out. That makes the conversion plain arithmetic:

T\displaystyle T=3,600×h+60×m+s\displaystyle {}= 3{,}600 \times h + 60 \times m + s
t\displaystyle t=86,400×D+T\displaystyle {}= 86{,}400 \times D + T

D is the number of whole days since January 1, 1970, and h, m and s are the hour, minute and second in UTC, so T is the seconds so far that day. Dates before 1970 give negative numbers. The result does not depend on where you are: a timestamp marks one instant for the whole world.

Time zones only matter when you read the instant on a clock. The tool looks up the offset for your chosen city at that instant in the IANA time zone rules, so daylight saving is applied when it was in force. Typing a date and time works the other way: it takes off the offset to reach UTC, then counts the seconds.

Many systems count in smaller units. JavaScript's Date.now() and Java use milliseconds (13 digits today), some databases use microseconds (16 digits) and Go and many tracing tools use nanoseconds (19 digits). The tool reads the digit count to pick the unit. A short value such as 86400 is read as seconds, one day after the epoch; pick the unit yourself if the guess is wrong.

Worked examples

A log line from a New York server

A server log records an event at 1767225600. It has 10 digits, so it is seconds. That is 2026-01-01 00:00:00 UTC, the first second of 2026 in UTC. The New York team saw it at 7:00 pm on Wednesday, December 31, 2025, because New York is UTC−5 in winter. A report grouped by local date would put it in 2025.

Open this example in the tool

A token that expires at midnight in London

Sam needs an access token to stop working at midnight at the start of July 1, 2026 in London. London is on summer time then (UTC+1), so the moment is 11:00 pm UTC on June 30. The expiry is 1782860400 in seconds, or 1782860400000 in milliseconds for JavaScript.

Open this example in the tool

Will it fit in 32 bits?

An old embedded system stores time in a signed 32-bit integer. The largest value it can hold is 2147483647, which is 2038-01-19 03:14:07 UTC. One second later, 2147483648 (2038-01-19), wraps around to a negative number and reads as December 13, 1901. Any date past January 19, 2038 needs a 64-bit field.

Open this example in the tool

Reading your result

The big line is the other side of what you typed. Type a timestamp and you get the UTC date and time; type a date and you get the timestamp. Both sides stay editable, and the tiles add the ISO 8601 form, the local time in your chosen city and how far the moment is from now.

ISO 8601 writes 2026-01-01T00:00:00.123Z for the JavaScript value 1767225600123. The Z means UTC. A local form such as 2025-12-31T19:00:00-05:00 names the same instant with its offset. HTTP headers use the older form Thu, 01 Jan 2026 00:00:00 GMT.

The timeline shows where your timestamp sits against two limits. Signed 32-bit time ends at 03:14:07 UTC on January 19, 2038. Unsigned 32-bit time starts in 1970 and ends on February 7, 2106. JavaScript dates go about 275,760 years either way, so the tool refuses anything beyond that.

Common mistakes

  • Reading milliseconds as seconds. Treat 1767225600123 as seconds and you land in the year 57,971. If a date looks absurd, count the digits.
  • Adding your offset twice. A timestamp is already UTC. Code that converts it to local time and then applies the offset again ends up hours out.
  • Using the local date for daily totals. An event at 1767225600 is January 1 in London but December 31 in New York. Decide which zone your report counts days in.
  • Assuming a fixed offset all year. New York is UTC−5 in winter and UTC−4 in summer. Converting summer dates with the winter offset puts them an hour off.
  • Storing time in 32 bits. Fields typed as a 32-bit int overflow in 2038. Use a 64-bit integer or a proper date type.

Questions people ask

In JavaScript, Math.floor(Date.now() / 1000) gives seconds (Date.now() alone is milliseconds). In Python, int(time.time()). On Linux or macOS, date +%s in a terminal. The Current Unix time card on this page shows the same number from your device clock.

Sources