How to use the Unix time converter
- Enter a Unix timestamp in the left field to see the matching UTC date and time on the right.
- Choose seconds (s) or milliseconds (ms) explicitly; changing the unit recalculates the opposite field.
- 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.
- 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).
| Direction | Method | Exact example |
|---|---|---|
| Unix timestamp seconds (s) to UTC date and time | Multiply 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 time | Add 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
- Timestamp seconds accept signed integers or decimals with at most three fractional digits. Timestamp milliseconds accept signed integers only. Scientific notation and thousands separators are not accepted, avoiding ambiguous or silently rounded input.
- The displayed UTC range is limited to four-digit years, from 0000-01-01 00:00:00.000 UTC through 9999-12-31 23:59:59.999 UTC. Values outside that range return an error instead of an invalid date.
- A negative timestamp is valid and represents an instant before 1970. Leap seconds are not represented by JavaScript dates or ordinary Unix time, so the seconds field runs from 00 through 59.
- This page does not convert local time zones, schedule events, calculate countdowns, or account for daylight-saving rules. Convert a local civil time to UTC with a reliable time-zone source before using it here.
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.