Unix timestamp converter
Convert between timestamps and dates in both directions, with automatic seconds or milliseconds detection.
Current timestamp
LiveTimestamp → date
Date → timestamp
2025-01-01 12:00:00 and similar, parsed in your local time zone.Common reference timestamps
How Unix time works
A Unix timestamp (also called epoch time or POSIX time) counts the number of seconds elapsed since 00:00:00 UTC on 1 January 1970, ignoring leap seconds. It is a single number, it sorts correctly, and it carries no time zone — which is exactly why it is the standard way to store an instant in databases, logs and APIs.
The ambiguity is only in the unit. Seconds give a 10-digit number; milliseconds give 13. Mixing them produces a date in 1970 or in the year 55,000, so this converter reports which unit it detected rather than guessing silently.
Displaying a timestamp is a separate step: the same instant is a different wall-clock time in every time zone. That is why the result shows local time and UTC side by side. When you are debugging a discrepancy, compare UTC values first — if UTC matches, the data is right and only the display time zone differs.
Two practical gotchas. Leap seconds are not counted, so Unix time and UTC drift by a small integer number of seconds that is handled by the clock, not by the timestamp. And the famous 2038 problem only affects software storing the value in a signed 32-bit integer; 64-bit storage and JavaScript numbers are fine.
For storage, prefer UTC timestamps with an explicit ISO 8601 string when humans need to read it (2025-01-01T12:00:00Z). The trailing Z is what prevents the most common bug: a timestamp silently interpreted in the wrong zone.
Timestamps in practice
Unix timestamps are everywhere once you start looking: the number at the start of every log line, file modification times, database columns, cache TTLs, signed-URL expiry parameters — and the iat / exp claims inside tokens, which are seconds, not milliseconds (the JWT decoder converts them for you). Whenever something looks off by a factor of a thousand, unit confusion is the cause.
The tell is the digit count: 10 digits is seconds, 13 is milliseconds. Feeding milliseconds into a seconds-based parser prints a date around the year 55,000; feeding seconds into a milliseconds parser prints somewhere in 1970. Both are instantly recognisable, and this converter reports which unit it detected instead of guessing silently.
The other direction — date to timestamp — is where the time-zone bug lives. Only ISO 8601 with an explicit offset is unambiguous: 2025-01-01T12:00:00Z is the same instant everywhere, and 2025-01-01T12:00:00+08:00 is the same instant too, just written differently. Bare strings are not: per specification, a date-only ISO string is read as UTC midnight while date-plus-time strings are read in local time by many engines — so 2025-01-01 and 2025-01-01 00:00 can be hours apart. Never store a naive local time without a zone; store UTC epoch or an ISO string ending in Z, and convert only when a human asks to see it.
Abbreviations are not time zones. CST is Central Standard Time in North America, China Standard Time and Cuba Standard Time simultaneously, so it identifies nothing on its own. The robust identifiers are IANA names like America/Chicago (which carry daylight-saving history) or explicit offsets like -06:00. Daylight saving adds two further edge cases for local arithmetic: the spring-forward hour that never exists and the fall-back hour that happens twice — wall-clock math around those boundaries is exactly why UTC storage wins.
Some landmark values are worth having in your head: 0 is 1970-01-01T00:00:00Z; 1000000000 was 2001-09-09; 2147483647 — the signed-32-bit maximum — falls on 2038-01-19 03:14:07Z, the famous overflow date for old software. JavaScript’s Date spans roughly ±275,000 years, so web tooling will not meet the ceiling. The reference grid above carries more of these, click-to-copy.
Related pages do the other halves of the job: the text tools count and clean log extracts before you parse them, and the unit converter handles the durations around the instants.
For quick access from a terminal rather than a browser, every mainstream language prints the current epoch directly: date +%s in a shell, time.time() in Python, Date.now() / 1000 in JavaScript, time.Now().Unix() in Go, System.currentTimeMillis() / 1000 in Java. The same commands with the millisecond variant are one keystroke away. Knowing which one your stack prints by default is exactly what prevents the 1970-or-55,000 mix-up: Unix-style shells print seconds, JavaScript prints milliseconds, and logs that merge both sources will eventually contain both units.
Duration arithmetic is the last practical trap. “3 days ago” is not always 259,200 seconds: across a daylight-saving boundary, three calendar days can be 23, 24 or 25 hours. If a feature must mean “the same wall-clock time three days from now”, do the addition in a date library with the time zone attached and convert to an epoch at the end — not the other way around. The reference timestamps and live clock at the top of this page exist precisely so you can sanity-check the result.
One parsing quirk bites mobile developers most: new Date("2025-01-01 12:00:00") with a space instead of T is not standard, and older iOS Safari returns Invalid Date for it. The fix is the same in every direction — stick to ISO 8601 with an explicit offset, or pass the numeric epoch straight through, which is why APIs prefer it: a bare number cannot be misread.
Frequently asked questions
Seconds or milliseconds — which do I have?
Seconds timestamps have 10 digits, milliseconds have 13. This converter detects both automatically and tells you which it assumed.
Why does the converted time differ from what I expect?
Unix timestamps are absolute — they count seconds since 1 January 1970 UTC. What differs is the time zone used to display them, so the same timestamp is a different wall-clock time in each zone.
What happens in 2038?
Systems that store a Unix timestamp in a signed 32-bit integer overflow on 19 January 2038. Modern 64-bit systems and JavaScript numbers are unaffected.
How to convert a timestamp
- Enter a value: Type a Unix timestamp, or pick a date and time.
- See the conversion: Compare the other representation in local and UTC time zones.
- Copy: Copy the timestamp or date string you need.