Unix Timestamp Converter
Convert Unix timestamps to readable dates and dates back to Unix time.
Written by Anil Gautam · Updated
How does the converter tell seconds from milliseconds?
Input made only of digits is treated as a timestamp. Ten digits or fewer are read as seconds, and eleven or more as milliseconds. 1791331200 and 1791331200000 both produce 2026-10-07T00:00:00.000Z on the UTC line, the first second of 7 October 2026 in UTC, which is 5:30 AM in India.
The ten-digit limit, 9999999999, falls on 20 November 2286, so every seconds value in use today fits. Microsecond values (16 digits) are read as milliseconds and land in the year 58735, and 19-digit nanosecond values are rejected, so divide them by 1,000 or 1,000,000 first. Decimal seconds such as 1700000000.5 return "Invalid timestamp or date", and a negative value for a date before 1970 is not read as a timestamp at all. 2147483647 converts to 2038-01-19T03:14:07.000Z, the last second a signed 32-bit counter can hold.
Why does a date give an unexpected timestamp?
Text that is not all digits goes to the browser's date parser, and the format decides the time zone. An ISO date on its own, 2026-10-07, is read as midnight UTC (1791331200). Add a time without a zone, as in 2026-10-07T00:00, and it becomes midnight in your own zone: in India that is 1791311400, five and a half hours earlier. Ending the text with Z or an offset such as +05:30 removes the doubt.
Slash dates are read month first. 07/10/2026, written the Indian or British way for 7 October, comes out as 10 July 2026. Use the YYYY-MM-DD form for any date you type by hand.
How do I read the four output lines?
Unix seconds and Unix milliseconds are the same instant at two precisions. JavaScript's Date.now() returns milliseconds, while the Unix date +%s command returns seconds, so pick the line that matches the system receiving the value. Unix time counts every day as exactly 86,400 seconds and ignores leap seconds, which makes date arithmetic easy: 1791331200 minus 1767225600 (the start of 2026 in UTC) is 24,105,600 seconds, or 279 days.
The Local line follows your browser's language and time zone, so the same timestamp shows as 7/10/2026, 5:30:00 am in an English (India) browser and as 10/7/2026, 5:30:00 AM in a US English one set to the same zone. On the UTC line the format is ISO 8601, which reads the same everywhere and is the safer one to paste into logs or tickets. To see the time in another city, use the Time Zone Converter, and for the gap between two dates, the Date Difference Calculator.