Epoch Converter Convert Unix timestamps to dates and back

Enter a Unix timestamp to read the date in UTC and your time zone. You can also convert a date back to a timestamp.

Timestamp to date

Dates show whole milliseconds. Any smaller fraction is rounded toward zero. Relative times are approximate.

Current Unix time

The clock updates once a second while this tab is visible. It does not change your converted date.

Date to timestamp

Discord timestamps

Copy a code into a Discord message. These previews use your time zone; Discord displays the date in each reader’s language and time zone.

Start and end of the day, month and year

Each end is the last millisecond before the next period. Local days can be shorter or longer when the clocks change.

Every conversion runs in your browser. Your input is not stored or uploaded.

What is Unix time?

Unix time counts seconds from January 1, 1970 at 00:00:00 UTC. A timestamp identifies the same instant everywhere. The time zone changes how you display that instant, not the number itself. Negative values describe moments before 1970; zero is the start of the Unix epoch.

You can use this Unix timestamp converter to read a log entry, compare a stored date or prepare a date for a message. UTC, local time and ISO 8601 all describe the same converted moment. The RFC 2822 line uses a numeric UTC offset. That format requires a year from 1900 onward, so earlier dates have no RFC output.

Is a Unix timestamp in seconds or milliseconds?

Traditional Unix timestamps use seconds. Some applications use milliseconds, microseconds or nanoseconds instead. For dates near the present, seconds usually have 10 digits and milliseconds have 13. This page assumes seconds for up to 11 digits, milliseconds for 12–14, microseconds for 15–17 and nanoseconds for 18–20. A leading sign does not count as a digit.

Digit count is a guess, especially for dates far from today or values with leading zeros. Read the assumption below the input and choose the correct unit if you know it. The date display preserves whole milliseconds but cannot show finer fractions. The browser’s date range is limited to 100 million days before or after the epoch, as described in MDN’s JavaScript Date reference.

How to get the current Unix timestamp

In JavaScript, Math.floor(Date.now() / 1000) gives whole seconds. In Python, int(time.time()) does the same after import time. In a Unix shell, run date +%s. Your device’s clock determines the result; this page does not synchronize it with a server.

For a specific date, open Date to timestamp, enter the date and time, choose Local time or UTC, then press Convert date. A local time can be missing when clocks move forward or occur twice when they move back. The page rejects missing times and explains when it uses the earlier occurrence of a repeated time.

How to convert a Unix timestamp in Excel

If cell A1 contains Unix seconds, enter =(A1/86400)+DATE(1970,1,1) in another cell and format that cell as a date and time. The result represents UTC. If A1 contains milliseconds, divide by 86400000 instead. Excel’s DATE function supplies the epoch date in the workbook’s date system.

This formula does not apply your time zone or daylight saving rules. Use the local result above when you need the time on your device. Very old or very distant dates may also be outside your spreadsheet’s supported range.

Unix timestamp questions

Is a Unix timestamp always UTC?

A Unix timestamp counts from a UTC moment and has no time zone of its own. The same number can be displayed in UTC, Eastern time or another zone without changing the instant. Your browser supplies the local time zone used here.

What happens in 2038?

A signed 32-bit seconds counter reaches 2147483647 at 2038-01-19 03:14:07 UTC. Adding another second overflows that kind of counter. Systems with a wider time representation can continue beyond it; the problem does not affect every device in the same way.

Does Unix time count leap seconds?

Unix time ignores leap seconds and treats each day as 86,400 seconds. A leap-second label such as 23:59:60 is not accepted by this converter.

How do I use a timestamp in Discord?

Open Discord timestamps and copy one of the seven supplied codes into a message. For example, <t:1700000000:F> requests a full date and time, while <t:1700000000:R> requests a relative time. Discord renders these in each viewer’s time zone and language, as its formatting reference explains.

Why does my converted date look wrong?

First, read the unit the page assumed below the input. A timestamp in milliseconds read as seconds points far into the future. Then compare UTC with the named local time zone. If the local zone is wrong, review the time zone setting on your device.