Unix timestamp converter

Turn an epoch timestamp into a readable date in any time zone, or a date into a timestamp. Runs in your browser; nothing is uploaded.

Current Unix time

Seconds

-

Milliseconds

-

Timestamp to date

Date to timestamp

How to use the converter

How Unix time works

Unix time (also called epoch time or POSIX time) counts the seconds that have passed since the Unix epoch, 00:00:00 UTC on Thursday 1 January 1970. Right now it is a 10-digit number a little under 1.8 billion. Because it is a single number with no time zone, it is easy to store, sort and subtract: the difference between two timestamps is simply the number of seconds between them.

Unix time treats every day as exactly 86,400 seconds and ignores leap seconds. When a leap second is added to UTC, Unix time does not count it, so a timestamp maps to a date and time by plain arithmetic. The cost is that a small number of real seconds have no distinct timestamp. For almost every application this does not matter.

Seconds, milliseconds, microseconds and nanoseconds

The classic Unix timestamp is in seconds, but many systems use finer units. JavaScript's Date.now() and Java's System.currentTimeMillis() return milliseconds; some databases and tracing systems use microseconds; Go's UnixNano() returns nanoseconds. The quickest way to tell them apart is the number of digits for a present-day date:

UnitDigits todayExample (17 Oct 2026, 00:00 UTC)
Seconds101792195200
Milliseconds131792195200000
Microseconds161792195200000000
Nanoseconds191792195200000000000

When Detect is selected, the converter treats numbers below 100 billion as seconds (good until the year 5138), below 100 trillion as milliseconds, below 100 quadrillion as microseconds, and anything larger as nanoseconds. If you are converting a very old or far-future date, choose the unit yourself.

ISO 8601 and RFC 2822

The results include two standard text formats. ISO 8601 (as profiled by RFC 3339) writes dates from largest to smallest unit, such as 2026-10-17T14:30:00Z, where Z means UTC, or 2026-10-17T10:30:00-04:00 with an offset. It sorts correctly as text and is the usual choice for APIs and JSON. RFC 2822 is the format used in email headers, such as Sat, 17 Oct 2026 14:30:00 +0000.

Time zones and daylight saving time

Time zone names like Europe/Paris come from the IANA time zone database, which your browser uses to apply each zone's history of offsets and daylight saving changes. When you convert a date to a timestamp, two awkward cases can happen. In spring, clocks skip an hour, so a time such as 02:30 does not exist that day; the converter moves it forward by the size of the gap and tells you. In autumn, an hour repeats, so 01:30 happens twice; the converter uses the first one and tells you the other.

The Year 2038 problem

Many older programs store Unix time in a signed 32-bit integer (the C type time_t on 32-bit systems). The largest value it can hold is 2,147,483,647, which is 03:14:07 UTC on Tuesday 19 January 2038. One second later the counter overflows and wraps to -2,147,483,648, which those programs read as 20:45:52 UTC on Friday 13 December 1901. Try 2147483647 and -2147483648 in the converter to see both.

The fix is to use 64-bit time, which lasts for about 292 billion years. Most current operating systems, languages and databases already do: 64-bit Linux, macOS and Windows use 64-bit time, the Linux kernel added 64-bit time support for 32-bit platforms in version 5.6 (2020), and the GNU C library lets 32-bit programs opt in from version 2.34. The risk is in places that are hard to update: embedded devices, old file formats and network protocols with 32-bit time fields, and database columns or code that store timestamps in 32-bit integers. MySQL's TIMESTAMP type, for example, is documented as ending at 2038-01-19 03:14:07 UTC. Some systems use an unsigned 32-bit counter instead, which lasts until 06:28:15 UTC on 7 February 2106 but cannot hold dates before 1970.

This converter uses JavaScript dates, which count milliseconds in a 64-bit floating-point number and can represent any moment within 100 million days of the epoch, roughly the years -271821 to 275760.

Troubleshooting

Related tools

Scheduling across zones? The meeting planner finds a time that works in several cities. Version 7 UUIDs carry a millisecond timestamp too: decode one with the UUID generator. To read timestamps inside API responses, tidy them first with the JSON formatter, and for timing things live there is the online stopwatch.

Frequently asked questions

What is a Unix timestamp? +

A Unix timestamp is the number of seconds since 00:00:00 UTC on 1 January 1970, called the Unix epoch, not counting leap seconds. It is the same number everywhere in the world at a given moment, which makes it a simple way for computers to store and compare times.

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

Count the digits. A timestamp for a date between 2001 and 2286 has 10 digits in seconds and 13 digits in milliseconds; 16 digits means microseconds and 19 means nanoseconds. This converter detects the unit from the size of the number and tells you which one it assumed.

What is the Year 2038 problem? +

Systems that store Unix time as a signed 32-bit integer can count only up to 2,147,483,647 seconds, which is 03:14:07 UTC on 19 January 2038. One second later the number overflows to its most negative value, and the time reads as 13 December 1901. Software that uses 64-bit time is not affected.

Does a Unix timestamp depend on the time zone? +

No. A Unix timestamp always counts from midnight UTC, so the same instant has the same timestamp in every time zone. Time zones only matter when you turn the number into a calendar date and clock time for display.

How do I get the current Unix timestamp in code? +

In JavaScript, Math.floor(Date.now() / 1000) gives seconds (Date.now() alone gives milliseconds). In Python, int(time.time()). On Linux or macOS, the shell command date +%s. In SQL, PostgreSQL has extract(epoch from now()) and MySQL has UNIX_TIMESTAMP().

Can a Unix timestamp be negative? +

Yes. Negative timestamps are moments before 1 January 1970. For example, -86400 is 31 December 1969 at 00:00:00 UTC. This converter accepts negative values, though some older software does not.

Related