Unix Timestamp Converter
Type in either box β a Unix timestamp or a local date & time β and the other updates live. Results are shown in both your local time zone and UTC.
How Unix Timestamp Converter Works
A Unix timestamp (also called epoch time) is the number of seconds -- or, in this tool's milliseconds mode, milliseconds -- that have elapsed since midnight UTC on January 1, 1970. It's the standard way computers store and pass around a point in time internally, since it's just one number with no time zone or formatting ambiguity. This tool converts that number to a readable date, and back, entirely in your browser.
Formula & Method
Converting a timestamp to a date is date = new Date(timestamp × 1000) for a seconds-based timestamp, or date = new Date(timestamp) directly for milliseconds. The tool auto-detects which unit you mean: a value with 12 or more digits is treated as milliseconds, 11 digits or fewer as seconds, and you can always override the detected unit with the Seconds/Milliseconds toggle. Going the other direction (date to timestamp) just divides the date's millisecond value by 1000 and rounds it, for the seconds unit.
Worked Example
The Unix timestamp 1700000000 (seconds) converts to 2023-11-14 22:13:20 UTC -- since it has 10 digits, it's auto-detected as seconds rather than milliseconds. In milliseconds mode, the same 10-digit number would instead be interpreted as a moment just 1,700,000 seconds (under 20 days) after the epoch, which is why picking the right unit matters.
Frequently Asked Questions
- How does the tool know if I typed seconds or milliseconds?
- It counts digits: 12 or more digits is auto-detected as milliseconds (since seconds-based timestamps for dates in the last ~50 years and next several decades all have 10 or 11 digits), and anything shorter is treated as seconds. You can also click the Seconds/Milliseconds toggle to force one or the other.
- Why do I see both a local time and a UTC time in the result?
- Unix timestamps themselves have no time zone -- they're just an elapsed count from a fixed UTC instant. This tool shows the same instant rendered in your browser's local time zone (for convenience) and in UTC (since UTC is the zone-independent reference most logs, APIs, and databases use).
- What is the Unix timestamp for right now?
- Click "Use Current Time" to fill in the current moment's date and see its corresponding timestamp in both seconds and milliseconds (by toggling the unit), along with the relative time and ISO 8601 representation.
Pasting a 13-digit number auto-detects as milliseconds; 10 digits or fewer is treated as seconds β or set the unit explicitly below.