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.
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.
Format, validate, and beautify JSON with syntax highlighting and error detection.
Encode text or files to Base64 and decode Base64 strings back to their original form.
Format and indent SQL queries for better readability across all major dialects.
Convert HTML markup into clean Markdown syntax with support for tables and lists.
Write Markdown and see the rendered HTML output in real time with live preview.
Visualize unified diffs and patch files with color-coded additions and deletions.