Unix timestamp converter

Paste a number like 1700000000 to see the date it stands for, or pick a date to get its number. You don’t have to say whether it’s seconds, milliseconds, microseconds or nanoseconds. The size of the number gives it away.

Unix time right now, in seconds

…

Results appear as you type. Every conversion is done by your browser: the values you enter are not sent to us.

Number to date

Date to number

The date and time fields are read in the time zone chosen above. A text that ends with Z or an offset such as +02:00 keeps its own zone.

One number, the same instant everywhere

Ask three people on a video call what time it is and you might hear 9:00, 15:00 and 23:00. They’re all right, which is no help at all to a computer that has to put events in order, expire a session or sign a document.

Unix time gets around this by counting the seconds since midnight UTC on January 1, 1970, a starting point known as the epoch. The count hit 1,700,000,000 on November 14, 2023 at 22:13:20 UTC. It was 5:13 pm in New York and already the next morning in Tokyo, and every machine on Earth showed the same number.

A timestamp has no time zone and no daylight saving time. Zones only come in when the number gets turned into something a person reads. That’s why this page asks which zone you want and shows UTC next to it.

Seconds, milliseconds and beyond

The original count is in seconds. Plenty of systems want finer steps, so they count smaller units from the same epoch, and nothing in the number says which unit you’re looking at. You have to go by its length:

UnitDigits todayTypical source
Seconds10Unix tools, PHP time(), JWT dates, most APIs
Milliseconds13JavaScript Date.now(), Java, Kafka
Microseconds16PostgreSQL, Python time.time_ns() // 1000, trace logs
Nanoseconds19Go UnixNano(), InfluxDB, OpenTelemetry

The converter does the same: under 100 billion it reads seconds, under 100 trillion milliseconds, then microseconds, then nanoseconds. It tells you which one it assumed. The guess only goes wrong for dates close to 1970 written in a fine unit, and the “Unit” list lets you overrule it.

Mixed-up units are the classic timestamp bug. Read seconds as milliseconds and you land in January 1970. Read milliseconds as seconds and you land tens of thousands of years in the future.

Values worth a second look

Zero, or a very small number
0 is the epoch itself. It’s what an empty date field holds, and in zones west of UTC it shows up as December 31, 1969. Values within a month of the epoch get flagged too, since they’re usually durations or fields nobody filled in.
Negative numbers
They’re valid and count backward: -86400 is December 31, 1969. Some older software can’t store them.
2,147,483,648 and above
A signed 32-bit integer stops at 2,147,483,647, which is 03:14:07 UTC on January 19, 2038. One second later such a counter wraps around to December 1901. Systems that still keep time in 32 bits have until then to move to 64.
-1
Often what a function returns when it failed to read a date.

From a date back to a number

Going the other way takes one more piece of information, and that’s the zone the date was written in. “March 9, 2025 at 14:30” is one instant in Chicago and a different one in Berlin, six hours apart. The date and time fields are read in the zone you select. A text such as 2025-03-09T14:30:00-05:00, or one that ends in Z, carries its own offset and is read as written.

Daylight saving time produces two odd cases, and the tool reports both:

  • A time that doesn’t exist. When clocks jump from 02:00 to 03:00, that day has no 02:30. The converter moves the reading past the jump, as most software does, and says so.
  • A time that exists twice. When clocks go back from 02:00 to 01:00, 01:30 happens two times, an hour apart. The converter returns the first one and gives you the second as well.

Unix time ignores leap seconds: every day counts as exactly 86,400 seconds. The arithmetic stays simple, but a timestamp isn’t a true count of elapsed seconds. It has been off by 27 since 1972.

Zone rules come from the time zone database built into your browser. For past dates they reflect the rules known today, and a country can still change its rules for future dates.

Questions people ask

What is a Unix timestamp?

The number of seconds since January 1, 1970 at 00:00:00 UTC, not counting leap seconds. It names one instant with a single integer that doesn’t depend on any time zone, so it’s easy to store, compare and subtract.

How do I know if a timestamp is in seconds or milliseconds?

Count the digits. For current dates, seconds have 10 digits and milliseconds 13. Microseconds have 16 and nanoseconds 19. If your date lands in 1970 or in some far-off year, the unit was read wrong.

Why does my date show as January 1, 1970?

The stored value is 0 or close to it. Either the field was never filled, a failed conversion returned 0, or a value in seconds was read as milliseconds. West of UTC the same instant shows as December 31, 1969.

What is the year 2038 problem?

Software that keeps Unix time in a signed 32-bit integer can count up to 2,147,483,647, which is 03:14:07 UTC on January 19, 2038. The next second overflows and reads as a date in December 1901. The fix is to store time in 64 bits.

Does a Unix timestamp have a time zone?

No. It counts seconds from an instant defined in UTC, so the same number is correct everywhere. A time zone only gets applied when the number is shown as a calendar date and a clock time.

How do I get the current Unix time in code?

In a shell, date +%s. In JavaScript, Math.floor(Date.now() / 1000). In Python, int(time.time()). In PHP, time(). In SQL, UNIX_TIMESTAMP() on MySQL and EXTRACT(EPOCH FROM now()) on PostgreSQL.