Developer tools
Unix Timestamp
Convert Unix timestamps to dates and back. Detects seconds, milliseconds, microseconds and nanoseconds, with UTC, local and any time zone.
How it works
A Unix timestamp counts time since 1 January 1970 00:00:00 UTC, ignoring leap seconds. Time reads seconds, milliseconds, microseconds or nanoseconds; it guesses the unit from the number's size (10 digits today are seconds, 13 are milliseconds) and lets you override the guess.
Conversion uses exact integer arithmetic (BigInt), so large millisecond, microsecond and nanosecond values round-trip without floating-point error. Negative values are before 1970. The supported range is ±8.64 × 10¹⁵ milliseconds (about ±275,000 years) — the same as JavaScript and Temporal.
The reverse direction turns a date, time and time zone into Unix values — with the same DST checks as the converter.
Worked example
- 0 → 1970-01-01T00:00:00Z (the Unix epoch)
- 1000000000 → 2001-09-09T01:46:40Z
- 1728316800 (seconds) → 2024-10-07T16:00:00Z
- 1728316800000 (milliseconds) → 2024-10-07T16:00:00Z
- -1 → 1969-12-31T23:59:59Z
- 8640000000001 (seconds) → 2243-10-17T00:00:00.001Z
Edge cases handled
- 0, 1 and −1 (before the epoch).
- Second / millisecond / microsecond / nanosecond detection, with manual override.
- Fractional seconds and milliseconds (e.g. 1728316800.5).
- Invalid input: letters, exponents (1e9), thousands separators and hex are rejected with a clear message.
- Out-of-range values: “That timestamp is outside the supported range.”
- Negative timestamps floor towards −∞ (−1.5 s is Unix second −2), as Unix tools do.