Convert Unix timestamps to dates and back. Runs on your device.
A Unix timestamp counts time from 1970-01-01 00:00:00 UTC. Seconds, milliseconds, microseconds and nanoseconds are all common units, and JavaScript's Date.now() returns milliseconds. The tool guesses the unit from the number of digits: 1 to 11 digits are seconds, 12 to 14 are milliseconds, 15 to 17 are microseconds, and 18 or more are nanoseconds. Real values from today have 10 digits for seconds, 13 for milliseconds, 16 for microseconds and 19 for nanoseconds, and the thresholds sit between them. A value that is unusual for its source can be read in another unit: pick the unit yourself and the result changes at once. The Detected unit row shows which unit was used, marked as chosen when you picked one. Fractions of a second are not supported in the timestamp box, so use milliseconds for them. A number such as 1700000000.5 or 1e9 is refused with a message, not guessed.
The UTC line is the reference time with no offset. The device line shows the same moment in the time zone your browser reports for this device, with the offset in force at that moment, such as UTC-05:00 for New York in November. Offsets change with daylight saving, and some historical offsets include seconds. The tool does not carry its own daylight-saving rules: it asks your browser for the offset at each instant, so the device line follows the same time zone data as your system clock. To see a moment in another zone, use the timezone converter. The date and time form has a choice of UTC or This device. Pick the one that matches the clock you are reading the date from, and the result is the Unix timestamp for that moment.
Negative values count back from 1970. The value -1 is one second before 1970-01-01 00:00:00 UTC, which is 1969-12-31 23:59:59 UTC. For milliseconds, the Unix seconds row rounds down, so -1 millisecond is -1 second and -1001 milliseconds is -2 seconds. The tool accepts values up to plus or minus 8,640,000,000,000,000 milliseconds. That is 100,000,000 days, about 273,791 years either side of 1970. The ISO 8601 range it covers runs from -271821-04-20 to +275760-09-13. Values beyond that are refused with a message. The RFC 2822 line is not shown for years before 0000 or after 9999, because that format has no way to write them.
The relative line compares the timestamp with the time the page was opened, or with the time you last pressed Now. It reads in seconds, minutes, hours, days, months and years, for example 3 hours ago or in 2 days. It does not tick, so the text stays the same until you press Now again. Months are counted as 30 days and years as 365 days, so a month or a year is an estimate and can differ from a calendar month or year by a day or so. The Now button fills the timestamp box with the current time in milliseconds and sets the unit to Auto. Times that do not exist on your device's clock, such as the hour that clocks skip forward, are explained with a notice in the date result.
Count the digits. 1700000000 has 10 digits and is seconds, the time 14 November 2023 22:13:20 UTC. 1700000000000 has 13 digits and is the same moment in milliseconds. The tool reads 1 to 11 digits as seconds and 12 to 14 as milliseconds, so the unit follows from the digit count. Use the Unit chips for any value that does not match its source.
Some older systems store seconds in a signed 32-bit number, which stops at 2147483647. That value is 2038-01-19 03:14:07 UTC, and the next second overflows. This tool does its arithmetic with larger numbers, so 2147483648 is read correctly as 2038-01-19 03:14:08 UTC. Software that still uses 32 bits will need an update.
UTC has no offset. Your device line adds the offset your browser reports for this device at that moment, for example UTC+05:30 in India, where the clock is 5 hours and 30 minutes ahead of UTC. The same timestamp shows a different wall clock time in each zone, but it is one moment.
When clocks skip forward, 02:30 on 10 March 2024 in New York never happens. Your browser moves it to 03:30 EDT, and the tool shows that moment with a notice saying which wall time was used. A time that happens twice, such as 01:30 on 3 November 2024 in New York, uses the earlier of the two moments, which is the first time that clock reads 01:30.
Yes. -1 is one second before 1970, and -86400 is the start of 31 December 1969 in UTC. Negative values work in every unit. For a negative value in milliseconds, the Unix seconds row rounds down: -1500 microseconds is -2 milliseconds, and -1001 milliseconds is -2 seconds.
No. The timestamp, date and time are read and converted in this tab. The page counts visits with Google Analytics, but it does not send any timestamp, date, time or zone. The only thing saved is your choice of UTC or This device, in this browser.