Time & Random

Unix Timestamp Converter

Convert a Unix timestamp to a date, or a date to seconds and milliseconds.

If the timestamp is filled, it is converted. Otherwise the date is read as this browser's local time. UTC is shown separately.

Results appear here.

What the result means

A Unix timestamp counts time from 1970-01-01 00:00:00 UTC. This page does not guess the unit from the size of the number. A value of exactly ten digits is seconds. A value of exactly thirteen digits is milliseconds. Any other length is rejected with an error, including eleven and twelve digits, and the page does not pad or trim the text to force a fit. When the timestamp box is empty, the date and time field is read instead. That control has no offset, so the browser treats it as this computer's local zone. An impossible calendar date is an error and is not rolled into the next month. The result lists seconds, milliseconds, a UTC timestamp in ISO form, and a local string. UTC is shown separately from the local reading.

Related tools

Advertisement

Questions

Is it seconds or milliseconds?

Ten digits means seconds. Thirteen digits means milliseconds. Any other length is rejected, and the page does not guess. Leading zeros count toward the length.

Which timezone is used?

A timestamp is an instant, so the UTC line has no local shift. The datetime-local field is the browser's local zone, because that control has no offset. UTC is shown separately from the local string.

Why was a 12-digit number rejected?

The length was not exactly ten or thirteen digits. Eleven digits, twelve digits, a decimal point, and a minus sign all fail the same way. The page will not pad or trim the text to force a unit.