Epoch / Unix timestamp converter
Convert Unix timestamps to dates and back. Auto-detects seconds vs milliseconds; runs in your browser.
Runs 100% in your browserHow to convert a Unix timestamp
- Enter a timestamp. Paste a Unix timestamp (seconds or milliseconds) to see the date.
- Or pick a date. Use the date field to convert a calendar date back to a timestamp.
- Copy what you need. Grab the seconds, milliseconds or ISO string.
About Unix time
Unix time is the lingua franca of timestamps in logs, databases and APIs because it's a single number with no timezone ambiguity. Systems store seconds (or milliseconds) since 00:00:00 UTC on 1 January 1970 — the “epoch” — and format to a human date only at the edges. This converter shows both interpretations and renders the result in your local zone, UTC and ISO 8601, plus a relative phrase like “3 days ago”, so you can sanity-check log lines and API responses instantly.
Seconds or milliseconds?
The single most common timestamp bug is mixing the two. Unix tools, Postgres and most back-ends count in
seconds (a 10-digit number today); JavaScript's Date.now(), Java and many
JSON APIs count in milliseconds (13 digits). A value off by a factor of 1,000 lands you in
1970 or in the year 52,000. This tool auto-detects by length — anything longer than 11 digits is treated as
milliseconds — and always shows you both the seconds and milliseconds form so you can copy whichever the
other system expects.
Time zones and the epoch
A Unix timestamp has no time zone — it names one absolute instant on the planet. The time zone only enters when you display it, which is exactly why storing epoch seconds and formatting per-user avoids a whole class of off-by-an-hour bugs. To go the other way and convert a wall-clock time between regions, use the time zone converter.
The Year 2038 problem
Older systems stored the timestamp in a signed 32-bit integer, which overflows at 03:14:07 UTC on 19 January 2038 and wraps to a negative number — the modern echo of the Y2K bug. The fix is a 64-bit time type, now standard on current platforms, which pushes the limit billions of years out. It's worth knowing if you maintain embedded or legacy code that still does date math in 32 bits.
Frequently asked questions
- It is the number of seconds (or milliseconds) elapsed since 00:00:00 UTC on 1 January 1970, the "Unix epoch". It is a timezone-independent way to represent a moment in time.
- A 10-digit number is seconds; a 13-digit number is milliseconds. This converter auto-detects based on length, and you can see both interpretations.
- Both your local timezone and UTC are shown, plus the ISO 8601 string. Conversion happens in your browser using its clock and locale.
- No — all conversion runs locally in your browser.