Unix ⇄ UTC

Epoch seconds or milliseconds to a readable date, and back.

About Unix ⇄ UTC

Convert a Unix timestamp to a readable UTC and local date, or a date to epoch seconds and milliseconds. Seconds and milliseconds are told apart automatically.

How to use

  1. In "Epoch to date", type a timestamp. The unit is guessed from the size: below 1e11 is seconds, then milliseconds, from 1e14 microseconds and from 1e17 nanoseconds; the hint says which was assumed.
  2. In "Date to epoch", type a date as ISO 8601 (2025-05-01T13:57:00Z) or as YYYY-MM-DD HH:mm:ss. A date with no zone is treated as UTC.
  3. Both panels show the result as you type: seconds, milliseconds, ISO 8601, the full UTC date, the same instant in your local zone, and a relative phrase such as "in 3 days". Each row has a Copy button, and Now fills in the current time.

What it supports

  • Positive and negative timestamps (dates before 1970), and decimal seconds.
  • Any instant JavaScript's Date can hold: about 271,000 years either side of 1970.
  • Date parsing is strict: YYYY-MM-DD, optionally followed by HH:mm, HH:mm:ss or HH:mm:ss.sss after a T or a space, then an optional Z or offset such as +05:30. Impossible dates such as 2025-02-30 or 24:00 are rejected rather than rolled over, and other formats such as 01/05/2025 are rejected.
  • The UTC and local rows are formatted for your browser locale. The relative row counts a month as 30 days and a year as 365.
  • Milliseconds are preserved in the ISO row and the milliseconds row; the seconds row is the floor.

Example

1714583820
→ Seconds       1714583820
→ Milliseconds  1714583820000
→ ISO 8601      2024-05-01T17:17:00.000Z

Privacy

Conversion runs in the page. No request is made and nothing is stored.

Frequently asked questions

What is a Unix timestamp?
The number of seconds since 1 January 1970 00:00:00 UTC, the Unix epoch, not counting leap seconds. It is a plain integer, so it is easy to store and compare and is the same in every time zone.
How do I tell whether a timestamp is in seconds or milliseconds?
Count the digits. Current times are 10 digits in seconds (about 1.7 billion) and 13 digits in milliseconds. JavaScript Date.now() and Java System.currentTimeMillis() use milliseconds; most Unix tools and Python time.time() use seconds.
What is the year 2038 problem?
Systems that store a Unix timestamp as a signed 32-bit integer overflow at 2,147,483,647 seconds, which is 19 January 2038 03:14:07 UTC. 64-bit timestamps, now standard, push the limit out by billions of years.
How do I convert a date to a Unix timestamp in code?
In JavaScript, Math.floor(Date.parse("2025-05-01T13:57:00Z") / 1000). In Python, int(datetime(2025, 5, 1, 13, 57, tzinfo=timezone.utc).timestamp()). Both give 1746107820; always attach a time zone so the result is unambiguous.