Unix Timestamp Converter
Convert epoch seconds or milliseconds to a readable date, and any date back to a timestamp. UTC and your local timezone are shown together.
Current epoch in your browser: —
| Result | Enter a timestamp, or a date, then press Convert. |
Seconds or milliseconds? The mistake that costs an afternoon
A Unix timestamp is almost always defined as seconds since the epoch. But JavaScript's
Date.now() returns milliseconds, and so do most Java, C# and Go APIs
when you ask for "epoch millis". Feed a millisecond value into something expecting seconds and you
get a date in the year 57,000 — which is usually the first clue.
This tool auto-detects by magnitude: values with 13 or more digits are treated as milliseconds. You can also force the unit with the dropdown when you know what you have.
| Digits | Interpretation | Roughly |
|---|---|---|
10 | Seconds | 2001 – 2286 |
13 | Milliseconds | 2001 – 2286 |
16 | Microseconds | Used by Python time.time() floats and some log formats |
19 | Nanoseconds | Go time.Now().UnixNano(), Java Instant |
What a Unix timestamp actually is
It counts the number of whole seconds elapsed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. That last clause matters: a Unix timestamp is not a duration, it is a label. When a leap second is inserted, the timestamp simply repeats, and software that assumes timestamps are monotonic can misbehave.
Because the count is anchored to UTC, a timestamp has no timezone. The same integer renders as different wall-clock times in different places. That is why this tool shows UTC and your local time side by side rather than picking one for you.
The 2038 problem is still real. Systems storing the timestamp in a signed
32-bit integer overflow at 2147483647, which is
19 January 2038 at 03:14:07 UTC. Linux moved to 64-bit time on most
architectures, but embedded devices, old file systems and binary file formats you cannot change
are still exposed. If you are designing a storage format today, use 64-bit milliseconds or an
ISO 8601 string.
Frequently asked questions
Why does my timestamp convert to 1970?
A value of 0 or something very small points at the epoch itself. This usually means the field you read was empty, or a millisecond value got truncated to seconds somewhere upstream.
Does a timestamp change with daylight saving time?
No. The timestamp is absolute; only its local rendering shifts. A given instant has one timestamp everywhere on Earth, which is exactly why timestamps are the right way to store moments in a database.
Should I store timestamps or ISO 8601 strings?
Timestamps are compact, sortable and unambiguous, but unreadable in a log or a database console. ISO 8601 strings are readable and self-describing. A common compromise is to store timestamps and format them at the edges.
What is the largest timestamp JavaScript can represent?
A JavaScript Date holds ±8.64 × 1015 milliseconds, roughly ±285,000 years. Values beyond that produce an Invalid Date, which this tool reports rather than silently rendering.
Privacy. Conversion happens in your browser using your device's clock and timezone. Nothing is uploaded, so it is safe to work with timestamps pulled straight from production logs.