How to convert an epoch timestamp
- The box opens with the current Unix time. Type or paste any other timestamp, or press Use current time to reload now.
- Read the rows under the result: Unix seconds, Unix milliseconds, ISO 8601, UTC and your own time zone, plus how long ago or from now it is.
- To go the other way, type a date such as
2025-01-01 12:00:00or2025-01-01T12:00:00Z. The tool reads it and shows the timestamp. Without a time zone the date is read as your local time; tick the box to read it as UTC.
Each row has its own Copy button, so you can take just the milliseconds or just the ISO string.
Seconds, milliseconds, microseconds: how the tool decides
A Unix timestamp counts the time since 1 January 1970 00:00:00 UTC, the Unix epoch. Systems differ in the unit, and the tool tells them apart by the number of digits:
| Digits | Unit | Example | Read as |
|---|---|---|---|
| up to 11 | seconds | 1735689600 | Wednesday, January 1, 2025 at 12:00:00 AM UTC |
| 12 to 14 | milliseconds (JavaScript, Java) | 1735689600000 | Wednesday, January 1, 2025 at 12:00:00 AM UTC |
| 15 to 17 | microseconds | 1735689600000000 | same instant |
| 18 or more | nanoseconds (Go, some databases) | 1735689600000000000 | same instant |
Both first rows land on the same moment, shown as ISO 8601 2025-01-01T00:00:00.000Z. Negative numbers are dates before 1970: -86400 is Wednesday, December 31, 1969 at 12:00:00 AM UTC. The stats row says which unit was detected, so a wrong guess is visible at once.
Dates people remember
| Timestamp (seconds) | Date and time (UTC) | Why it matters |
|---|---|---|
0 | Thursday, January 1, 1970 at 12:00:00 AM UTC | The epoch itself |
1700000000 | Tuesday, November 14, 2023 at 10:13:20 PM UTC | A round number many people noticed |
1735689600 | Wednesday, January 1, 2025 at 12:00:00 AM UTC | Start of 2025 |
2147483647 | Tuesday, January 19, 2038 at 3:14:07 AM UTC | The largest value of a signed 32-bit integer: the "Year 2038 problem" |
Systems that store seconds in a signed 32-bit integer overflow at 2147483647, on 19 January 2038, and wrap to a date in 1901. Modern systems use 64 bits, which lasts for about 292 billion years. If a program shows 1901 or 1970 for a valid date, a 32-bit or zero value is the usual cause.
Time zones and the pitfalls
- A timestamp has no time zone. It names one instant. Only when you show it as a date do you choose a zone, which is why the tool gives you UTC and your local time side by side.
- Dates without a zone are ambiguous.
2025-01-01 00:00:00is a different instant in Tokyo and in New York. Say the zone (Z, or+09:00) or tick the UTC option. - Leap seconds are ignored. Unix time pretends every day has exactly 86,400 seconds, so a timestamp is not an exact count of elapsed seconds across a leap second. It does not matter for ordinary work.
- Daylight saving time changes the local rows around the changeover but never the timestamp.
- Milliseconds versus seconds is the classic bug: a seconds value read as milliseconds gives a date in January 1970; milliseconds read as seconds gives a date thousands of years away.
To turn a timestamp from a login token into a readable date, paste the exp or iat number here; the JWT decoder does it for you. To count the days between two dates use days between dates.
Getting the current timestamp in code
- JavaScript:
Math.floor(Date.now() / 1000)for seconds,Date.now()for milliseconds. - Python:
import time; int(time.time()) - Bash:
date +%s(usedate -d @1735689600on Linux ordate -r 1735689600on macOS to convert back). - SQL: PostgreSQL
extract(epoch from now()); MySQLUNIX_TIMESTAMP(). - PowerShell:
[DateTimeOffset]::UtcNow.ToUnixTimeSeconds()
Related tools
- JWT decoder – JWT exp and iat claims are Unix seconds
- Time duration calculator – add and subtract clock times
- Days between dates
- Date calculator – add or subtract days from a date
Epoch and Unix timestamp converter FAQ
How do I convert a Unix timestamp to a date?
Paste the number into the box. The tool detects whether it is seconds, milliseconds or finer, and shows the date in UTC, ISO 8601 and your local time zone.
How do I convert a date to a Unix timestamp?
Type the date, for example 2025-01-01 12:00:00 or 2025-01-01T12:00:00Z. The Unix seconds and milliseconds rows show the timestamp. Add Z or an offset, or tick the UTC option, to avoid local-time ambiguity.
What is epoch time?
Epoch time, or Unix time, is the number of seconds since 1 January 1970 00:00:00 UTC. It is a simple way to store one moment without a time zone.
What is the difference between seconds and milliseconds timestamps?
Seconds timestamps have 10 digits today (like 1735689600). Milliseconds timestamps have 13 digits (like 1735689600000), as JavaScript and Java use. The tool tells them apart by length.
What is the Year 2038 problem?
A signed 32-bit integer can store seconds only up to 2147483647, which is 19 January 2038 03:14:07 UTC. Systems that still use 32 bits overflow after that moment.
Why does my timestamp show 1970?
A value of 0, or a seconds value read as milliseconds, gives a date close to 1 January 1970. Check the unit and whether the value was set at all.
Is my data sent anywhere?
No. The conversion runs in your browser and nothing is uploaded or stored.