UNIX TIMESTAMP CONVERTER

Unix timestamp converter

Enter a timestamp or a date, get the other — opens with the current time.

What is a Unix timestamp?

The number of seconds since midnight UTC on January 1, 1970 (the "Unix epoch"), not counting leap seconds. Computers use it to store moments in time without time zones: 1767225600 is January 1, 2026, 00:00:00 UTC.

Is it in seconds or milliseconds?

Unix time is in seconds (10 digits today); JavaScript and many APIs use milliseconds (13 digits). The converter treats numbers with 12 or more digits as milliseconds.

Does a Unix timestamp depend on the time zone?

No — the same instant has the same timestamp everywhere. Only the displayed date and time change: the converter shows both UTC and your own time zone.

What is the year 2038 problem?

Old systems store Unix time as a signed 32-bit number, whose maximum, 2,147,483,647, is reached on January 19, 2038 at 03:14:07 UTC. After that such counters overflow; modern systems use 64 bits.

How do I get the current Unix time?

The page opens with it filled in. In code: Math.floor(Date.now() / 1000) in JavaScript, time.time() in Python, date +%s in a Unix shell.

How do I convert a timestamp to a date by hand?

Divide by 86,400 to get whole days since January 1, 1970, and keep the remainder as seconds into the day. The timestamp 1793188800 is 20754 days and 43200 seconds (12 hours) after the epoch, which is Wednesday, October 28, 2026, 12:00:00 UTC. Since the epoch day itself was a Thursday, the weekday is the number of days plus 4, modulo 7, counting Sunday as 0.

Can a Unix timestamp be negative?

Yes. Negative values are moments before the epoch: -86400 is Wednesday, December 31, 1969, 00:00:00 UTC. Some systems and programming languages limit the range, so check how yours treats dates before 1970.

Definition

A Unix timestamp counts the seconds that have passed since 00:00:00 UTC on January 1, 1970, ignoring leap seconds: every day is exactly 86,400 seconds long. POSIX defines it by a formula from the year, day of the year, hour, minute and second, which is why the timestamp is the same for everyone regardless of location. The value is an integer in seconds; many programming environments use milliseconds, and some use microseconds or nanoseconds, so the number of digits is a clue: 10 digits for seconds, 13 for milliseconds. The converter reads numbers of 12 or more digits as milliseconds.

Worked example: some well-known timestamps

1,000,000,000 is Sunday, September 9, 2001, 01:46:40 UTC. 1767225600 is Thursday, January 1, 2026, 00:00:00 UTC. The largest signed 32-bit value, 2,147,483,647, is Tuesday, January 19, 2038, 03:14:07 UTC. One second later a 32-bit signed counter wraps to a negative number, which is the year 2038 problem; systems that store the value as 64 bits are not affected for billions of years. 1793188800 is Wednesday, October 28, 2026, 12:00:00 UTC.

ISO 8601 and time zones

The ISO 8601 format shown in the table, such as 2026-10-28T12:00:00Z, is a text way to write the same moment; the Z at the end means UTC. A time written without a zone is ambiguous: 2026-10-28 12:00 means different moments in New York and in Tokyo. When you convert a date and time to a timestamp, choose whether it is UTC or your local time: the same wall-clock time gives timestamps that differ by the time zone offset, up to many thousands of seconds. A timestamp itself has no time zone; only its display does.

Common mistakes

Mixing seconds and milliseconds is the most common one: a 13-digit value read as seconds is a date tens of thousands of years in the future. Another is converting a local midnight and expecting a UTC one, which gives a different day on the other side of the Atlantic. A third is assuming a day is always the same on the wall clock; clock days with a daylight saving change have 23 or 25 hours, while a Unix day always has 86,400 seconds, so adding 86,400 does not always land on the same local time. And leap seconds are not counted, so Unix time differs slightly from a pure count of elapsed SI seconds.

Sources: The Open Group Base Specifications (POSIX.1-2017), definition 4.16 "Seconds Since the Epoch"; ISO 8601 date and time format; the Gregorian calendar rules in the date library of this site. Related: time zone converter, date calculator and time calculator.