Unix Seconds vs Milliseconds: UTC vs Local
POSIX time (IEEE Std 1003.1) is seconds since 1970-01-01T00:00:00Z and ignores leap seconds — each day is 86400 of those seconds. JavaScript Date stores milliseconds: new Date(n * 1000) vs new Date(n). toISOString() is UTC. Date.parse treats date-only YYYY-MM-DD as UTC midnight and a T date-time without an offset as local. Ten digits often look like seconds and thirteen like milliseconds, but digit count is not a unit — the same integer is two instants. Docify does not auto-detect the unit. Convert on /unix-timestamp/. UUID v7 output of this millisecond clock is /uuid-v7-generator/. ULID output is /ulid-generator/. This page does not parse those IDs. Nothing is uploaded.
The same decimal is not one instant. The unit (seconds vs milliseconds) and the display (UTC vs the browser zone) are separate choices. The live Unix timestamp converter makes both explicit and does not infer them.
Seconds since the Epoch are not JavaScript Date
POSIX: 86400-second days, leap seconds ignored
IEEE Std 1003.1 (“Seconds Since the Epoch”) relates a UTC civil name to an integer with a formula that treats every day as exactly 86400 seconds. Inserted UTC leap seconds are not added to the count. That value is not TAI and is not a table of leap-second insertions. Negative years relative to 1970 are left undefined by the POSIX formula; JavaScript Date still accepts some pre-epoch instants as negative milliseconds.
ECMA-262: one Number, in milliseconds
A JavaScript Date holds a time value: milliseconds from the same epoch, also ignoring leap seconds. Date.now() and getTime() return that millisecond count. new Date(n) treats n as milliseconds, so Unix seconds must be multiplied first. The representable range is about ±100 million days from the epoch; values outside that become Invalid Date. IEEE-754 integers stay exact only through 2^53 − 1 milliseconds — far beyond ordinary Unix seconds, but relevant for nanosecond-scale integers pasted by mistake.
Digit count is not a unit
1700000000 in both units
Ten digits often look like “seconds” and thirteen like “milliseconds,” but the same integer means different instants:
Unix seconds gain an 11th digit on 2286-11-20T17:46:40Z. Fractional seconds, leading zeros, and negative timestamps also break a length check. The sample on the live Unix timestamp converter fills 1700000000. Convert writes 2023-11-14T22:13:20.000Z. Docify’s Seconds toggle calls new Date(n * 1000); Milliseconds calls new Date(n). Click Convert to process.
UTC display vs local display vs parse
toISOString, toUTCString, toLocaleString
The stored instant does not have a time zone. toISOString() always writes UTC with a Z suffix. toUTCString() is the UTC HTTP-date style string (the GMT label there is UTC). toLocaleString() formats in the host zone from Intl.DateTimeFormat().resolvedOptions().timeZone. That is a display choice, not an IANA picker and not NTP.
Date.parse: date-only UTC, date-time local
ECMA-262’s date-time string format (a simplified ISO 8601) is the portable input. When the offset is absent, date-only forms (YYYY, YYYY-MM, YYYY-MM-DD) are UTC; date-time forms (YYYY-MM-DDTHH:mm:ss) are local. Locale phrases are engine-specific. Prefer a Z or a numeric offset.
Those two strings are not the same instant unless the browser zone is UTC. The converter uses Date.parse only. Unix seconds out are Math.floor(ms / 1000); milliseconds are getTime().
Neighbor clocks this page does not implement
JWT NumericDate, Y2038, TAI
RFC 7519 iat / exp / nbf are Unix seconds (NumericDate). The JWT decoder shows those numbers as new Date(n * 1000).toISOString() and does not compare them to the clock. A signed 32-bit time_t overflows at 2147483647 (2038-01-19T03:14:07Z); JavaScript Number is not that type. This site is not TAI, not a leap-second smear, not microseconds or nanoseconds, and not an NTP client. UUID v7 output of the same Date.now() millisecond clock is /uuid-v7-generator/. ULID output is /ulid-generator/. Those pages mint IDs; this converter does not.
Convert Unix seconds or milliseconds
Explicit unit. UTC ISO and local display. Nothing is uploaded.
Use Unix Timestamp Converter →FAQ
- What is the difference between Unix seconds and milliseconds?
- POSIX time (IEEE Std 1003.1) is an integer count of seconds since 1970-01-01T00:00:00Z, ignoring leap seconds. JavaScript Date stores an integer count of milliseconds from the same epoch. They are two integer clocks, not one number plus a fraction. The same integer is two instants depending on the unit. Digit length is a hint, not a unit, and the live converter does not auto-detect. Choose Seconds or Milliseconds on /unix-timestamp/.
- Which format should I use?
- JavaScript Date uses milliseconds. Unix/POSIX systems and many APIs use seconds. Check your target system.
- How do I convert between them?
- Seconds to milliseconds: multiply by 1000. Milliseconds to seconds: divide by 1000.
- Does this tool upload my data?
- No. All conversion runs in your browser using JavaScript. Nothing is sent to a server.