Skip to content

Unix time converter

Unix time is the number of seconds or milliseconds counted from 1970-01-01 00:00:00 UTC. Enter either value and the other side updates immediately.

Unix ↔ UTC

Unix time and UTC

Your data stays in this browser.

Choose seconds or milliseconds. Seconds may contain up to three decimal places; milliseconds must be an integer.

Enter a real UTC calendar date and a 24-hour time. Milliseconds are optional.

How to use the Unix time converter

  1. Enter a Unix timestamp in the left field to see the matching UTC date and time on the right.
  2. Choose seconds (s) or milliseconds (ms) explicitly; changing the unit recalculates the opposite field.
  3. Or enter UTC on the right as YYYY-MM-DD HH:mm:ss or YYYY-MM-DD HH:mm:ss.SSS UTC to fill the Unix timestamp on the left.
  4. The field you edit becomes the source. Impossible dates and malformed timestamps show an error.

What Unix time means

Unix time measures elapsed time from the Unix epoch, 1970-01-01 00:00:00 UTC. A timestamp of 0 is exactly that instant. Positive values are after the epoch and negative values are before it. UTC is used throughout this page; no local time-zone or daylight-saving offset is applied.

One second equals exactly 1,000 milliseconds. This converter stores the instant as an integer millisecond count, so a seconds value may carry zero to three fractional digits and a millisecond value must be an integer. It does not round a timestamp to the ordinary two-decimal display rule.

The UTC fields describe a calendar instant, while the output timestamp describes the same instant as elapsed seconds or milliseconds. Converting in either direction therefore uses the same epoch relationship. Leap years and month lengths are validated before a timestamp is produced.

All supported conversion directions

These four directions are the complete supported set. The unit is always explicit, and every date and time shown is Coordinated Universal Time (UTC).

DirectionMethodExact example
Unix timestamp seconds (s) to UTC date and timeMultiply seconds by 1,000 to obtain milliseconds, then add that duration to 1970-01-01 00:00:00.000 UTC.0 s = 1970-01-01 00:00:00.000 UTC.
Unix timestamp milliseconds (ms) to UTC date and timeAdd the entered integer millisecond count directly to the Unix epoch.1709251199123 ms = 2024-02-29 23:59:59.123 UTC.
UTC date and time to Unix timestamp seconds (s)Subtract 1970-01-01 00:00:00.000 UTC and divide the exact millisecond difference by 1,000; up to three fractional digits are retained.1969-12-31 23:59:59.999 UTC = -0.001 s.
UTC date and time to Unix timestamp milliseconds (ms)Subtract the Unix epoch and keep the signed difference as an integer number of milliseconds.2000-02-29 23:59:59.007 UTC = 951868799007 ms.

Worked checks

Epoch zero is a useful baseline check: both 0 seconds and 0 milliseconds refer to 1970-01-01 00:00:00.000 UTC. Selecting a different unit changes the meaning of a nonzero input, which is why this tool does not infer units from digit length.

For a leap-day and precision check, convert 2000-02-29 23:59:59.007 UTC to milliseconds to get 951868799007 ms. Switching the output to seconds gives 951868799.007 s. Converting either value back produces the same UTC instant, including the 7 milliseconds represented by .007 seconds.

Input rules and limits

Frequently asked questions

How do I know whether a timestamp uses seconds or milliseconds?

Use the unit supplied by the source system or its documentation. Ten versus thirteen digits is only a common convention, not a safe rule, so the converter requires an explicit choice.

Why can epoch seconds have three decimal places?

Fractions of a second carry millisecond precision. For example, 1.25 s equals exactly 1,250 ms. More than three fractional digits would require sub-millisecond precision that this tool does not claim.

Are negative Unix timestamps valid?

Yes. They identify instants before the epoch. For example, -1 s is 1969-12-31 23:59:59.000 UTC, while -0.001 s is one millisecond before the epoch.

Does the converter use my computer time zone?

No. Both the date input and the formatted date output are explicitly UTC. Browser locale may affect surrounding text, but it does not change the instant or apply a local offset.

Why was my date rejected?

The converter checks the actual Gregorian calendar. Dates such as 2023-02-29 or April 31 do not exist. A valid leap day such as 2024-02-29 is accepted.