Skip to content
DeviceCheckHub

Unix Timestamp Converter

Turn an epoch timestamp into a date, or a date into a timestamp, in any time zone. The current Unix time is below.

The current Unix time

Seconds—
Milliseconds—
Now in UTC—
Now in your zone—

Timestamp to date

Type a Unix timestamp to see its date.

Other time formats to date

Convert a Windows FILETIME or LDAP timestamp, .NET ticks, Chrome time, an Excel date, an Apple Cocoa time or hex seconds.

100-nanosecond steps since 1 January 1601 UTC, as in Active Directory lastLogonTimestamp.

Type a value to see its date.

Date to timestamp

Seconds—
Milliseconds—
ISO 8601—

Start and end of the day, month and year

For the date above, in the chosen zone, as Unix timestamps in seconds.

Several timestamps at once

How to convert a Unix timestamp

  1. Type or paste the timestamp into Timestamp to date. The page detects whether it is in seconds, milliseconds, microseconds or nanoseconds from the number of digits, and says which it chose.
  2. Read the date in UTC and in the time zone you picked at the top. The zone list covers every region and applies daylight saving time as it was on that date.
  3. To go the other way, choose a date and time under Date to timestamp and copy the seconds or milliseconds.
  4. For a long list, paste one timestamp per line into Several timestamps at once and copy all the dates together.

What Unix time is

Unix time counts the seconds since 00:00:00 on 1 January 1970 in UTC, a moment called the Unix epoch. For example, 1700000000 is 22:13:20 UTC on 14 November 2023. Because it is one number that does not depend on a time zone, it is the usual way for programs, databases and web services to store and exchange moments in time, and it makes sorting and subtracting times simple: the difference between two timestamps is the number of seconds between them.

Unix time does not count leap seconds. Every day is treated as exactly 86,400 seconds long, so the number can differ from the physical count of seconds by the few leap seconds that have been added since 1972. For almost every purpose this makes no difference.

Seconds, milliseconds, microseconds and nanoseconds

The original Unix timestamp is in seconds, but many systems count finer. JavaScript’s Date.now() and Java’s System.currentTimeMillis() return milliseconds (thousandths of a second); some databases and Python’s time functions use microseconds (millionths); Go and many logging systems use nanoseconds (billionths). A timestamp for a date in the present day has 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds, which is how the converter tells them apart. The most common mistake is reading a milliseconds value as seconds, which gives a date tens of thousands of years in the future.

Time zones and daylight saving time

A timestamp is the same everywhere; only the clock time changes with the zone. The same 1700000000 is 22:13 in UTC, 03:43 the next morning in India (UTC+5:30) and 17:13 in New York (UTC−5, because daylight saving time had ended). The converter uses your browser’s time zone data, so the offset it shows is the one that applied on that date, not today’s.

When you go from a date to a timestamp, daylight saving time creates two special cases. In spring, clocks jump forward and one hour never exists: 02:30 on the morning of the change in New York does not happen. In autumn, clocks go back and one hour happens twice. The converter tells you when your time falls in either situation, and for a repeated time it uses the earlier of the two moments.

ISO 8601 dates

The ISO 8601 line shows the date in the format most programs and APIs expect, such as 2023-11-14T22:13:20.000Z. The letter T separates the date from the time, and the final Z means UTC. For another zone the Z is replaced by the offset, for example +05:30. This is the safest format for storing or sending dates, because it is unambiguous and sorts correctly as plain text.

Get and convert the timestamp in code

These examples give the timestamp in seconds; multiply or divide by 1,000 for milliseconds.

Other epochs: LDAP, FILETIME, .NET, Excel, Chrome and Cocoa

Unix time is not the only way computers count time. Several common systems count from a different starting moment, or in different steps, and the converter above turns each of them into a date and back.

The year 2038 problem and negative timestamps

Some older software stores Unix time in a signed 32-bit integer, whose largest value is 2,147,483,647. That second is 03:14:07 UTC on 19 January 2038; one second later, such a system wraps around to a date in December 1901. Current operating systems and languages use 64-bit values, which do not run out for roughly 292 billion years, but old embedded devices, file formats and databases can still be affected. Dates before 1970 are written as negative numbers: -1 is one second before the epoch, 23:59:59 UTC on 31 December 1969. The converter accepts negative timestamps back to the year 1, and dates up to 31 December 9999.

Tips

Related tools: find the gap between two dates with the date calculator, compare clock times between cities with the time zone converter, or read JSON that contains timestamps with the JSON formatter.

Frequently asked questions

What is a Unix timestamp?

A Unix timestamp, also called epoch time or POSIX time, is the number of seconds that have passed since midnight at the start of 1 January 1970 in UTC, the “Unix epoch”. It is one plain number that means the same moment everywhere in the world, which is why computers use it to store and compare times.

How do I tell seconds from milliseconds?

Count the digits. A timestamp for a date today has 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. The converter picks the unit from the number of digits and tells you which it chose; you can set the unit yourself if the number is unusual. JavaScript and Java often give milliseconds, while Python, PHP and the Unix date command give seconds.

Does a Unix timestamp have a time zone?

No. A timestamp always counts from the same UTC moment, so it is the same number everywhere. The time zone only matters when you turn it into a clock time for people. This page shows the result in UTC and in the zone you choose, including daylight saving time as it applied on that date.

Why does my date and time have no timestamp, or two?

Twice a year, clocks in many zones jump. When they go forward, one hour never happens on the wall clock, so a time in that hour has no exact moment; the converter says so and gives the nearest valid one. When clocks go back, one hour happens twice, so a time in it matches two moments; the converter uses the earlier one and says so.

What is the year 2038 problem?

Some older systems store the timestamp as a signed 32-bit number, which can hold at most 2,147,483,647 seconds. That value is reached on 19 January 2038 at 03:14:07 UTC, and one second later such a system would wrap around to a date in 1901. Modern systems use 64-bit numbers, which last for hundreds of billions of years, and this converter handles all dates from year 1 to year 9999.

How do I convert an LDAP or Windows FILETIME timestamp to a date?

Choose Windows FILETIME / LDAP under Other time formats to date and paste the 18-digit number, such as an Active Directory lastLogonTimestamp. The value counts 100-nanosecond steps since 1 January 1601 UTC, so the converter divides by 10,000,000 and subtracts 11,644,473,600 seconds to reach Unix time. Every Unix timestamp you convert is also shown in this format.

How do I convert an Excel date to a Unix timestamp?

Choose Excel serial date and type the number Excel shows when you format a date cell as a number, for example 45000.5. For dates from 1 March 1900 onward the Unix time in seconds is (serial − 25569) × 86400. Excel keeps no time zone, so the result is read as UTC; if your sheet holds local times, adjust by your offset.

Is anything uploaded?

No. All conversions use your browser’s own clock and time zone data, so nothing you type is sent anywhere. The page remembers your time zone and unit choices on this device so that they are still there next time.

Last updated · About DeviceCheckHub