Magnitude distinguishes seconds from milliseconds
Inputs longer than twelve digits are treated as milliseconds. Shorter values are multiplied by 1,000 before constructing a JavaScript Date.
Convert between Unix timestamps and human-readable dates with timezone support and relative time display.
The guide
Unix time counts elapsed seconds from 1970-01-01 00:00:00 UTC, apart from the platform treatment of leap seconds. This converter accepts common second and millisecond values, shows several date representations, and can turn a calendar input back into whole Unix seconds.
A concrete input and expected output from the current implementation.
Input
0 seconds
Expected output
1970-01-01 00:00:00 UTC
Zero identifies the Unix epoch itself. A value such as 1700000000 is interpreted as seconds, while a thirteen-digit value is treated as milliseconds.
Inputs longer than twelve digits are treated as milliseconds. Shorter values are multiplied by 1,000 before constructing a JavaScript Date.
ISO and UTC forms avoid timezone ambiguity. The local form uses the timezone configured on the current device, so it can show a different clock time for the same timestamp.
The most common cause is a unit mismatch. A millisecond value treated as seconds is one thousand times too large, while seconds treated as milliseconds land near January 1970.
No. It identifies an instant relative to UTC. A timezone is applied only when that instant is formatted for a person.
The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.
Sent. Thank you.