Unix Timestamp Converter
Convert epoch timestamps to readable dates — and any date back to a timestamp.
Convert Unix epoch timestamps — the number of seconds or milliseconds since January 1, 1970 — into human-readable dates, and convert any date back into a timestamp, in whichever time zone you need.
A routine task when debugging logs, APIs, or databases that store dates as raw epoch numbers instead of formatted strings.
Telling seconds from milliseconds at a glance
| Digits | Unit | Roughly |
|---|---|---|
| 10 | Seconds | Any date from 2001 to 2286 |
| 13 | Milliseconds | The same range, ×1000 |
| 16 | Microseconds | Common in databases and tracing systems |
| 19 | Nanoseconds | Go's time.UnixNano, some log formats |
The quickest check: a 10-digit number starting with 17 is a recent date in seconds; a 13-digit number starting with 17 is the same date in milliseconds.
Epoch pitfalls worth knowing
- The Year 2038 problem: a signed 32-bit timestamp overflows on 19 January 2038. Systems still storing time in a 32-bit int will wrap to 1901.
- Unix time ignores leap seconds, so it isn't a true count of elapsed SI seconds since 1970 — it's a count of non-leap seconds.
- Negative timestamps represent dates before 1970 and are valid, though some libraries handle them badly.
- A timestamp of 0 usually means 'unset', not 1 January 1970. Seeing 1970 dates in a UI almost always indicates a null that was cast to a number.
- Timestamps have no time zone. The zone only matters when rendering them for a human.
Storing timestamps sensibly
Store the instant, display the local time. Keeping UTC (or an epoch integer) in the database and converting only at the presentation layer avoids an entire class of bugs, including the one where a record created during a DST transition becomes ambiguous.
The exception is future scheduled events tied to local wall-clock time — a 09:00 recurring meeting should stay at 09:00 local even if the zone's offset changes. For those, store the local time and the time zone identifier, not a fixed UTC instant.
Frequently asked questions
- What's the difference between a timestamp in seconds and milliseconds?
- Unix time is traditionally in seconds since epoch, but many systems (including JavaScript) use milliseconds — a millisecond timestamp will look about 1000× larger than the equivalent second-based one.
- What is the current Unix timestamp?
- The tool shows the live current timestamp updating in real time, alongside whatever specific date or timestamp you're converting.
- Does timestamp conversion depend on time zone?
- The underlying Unix timestamp itself is time-zone independent (it's a count of seconds from a fixed instant), but the human-readable date it converts to or from depends on which time zone you select for display.
- What is the Year 2038 problem?
- A signed 32-bit integer can only hold seconds up to 03:14:07 UTC on 19 January 2038, after which it overflows to a negative number and wraps to 1901. Any system still using 32-bit time storage needs migrating.
- Why is my date showing as 1 January 1970?
- That's epoch zero, which almost always means the timestamp field was null, empty or zero and got cast to a number somewhere in the pipeline.