Unix timestamp converter

See the current Unix time ticking live, convert any timestamp to UTC and your local time, and turn a date back into seconds or milliseconds.

Runs in your browser. Nothing you enter is uploaded.

Current Unix time (seconds)

Timestamp → date

Date → timestamp

How to use the Unix timestamp converter

  1. Paste a timestamp into Unix timestamp; the unit is detected automatically, or pick it yourself.
  2. Read the date in UTC (ISO 8601), in your local time and as a relative time such as 3 hours ago.
  3. To go the other way, pick a date and time on the right, or click Now.
  4. Copy the seconds, milliseconds or ISO value with the Copy buttons.

What is a Unix timestamp?

A Unix timestamp, also called epoch time, counts the seconds that have passed since 1 January 1970 at 00:00:00 UTC, not counting leap seconds. The timestamp 0 is that moment, 1759845600 is 7 October 2025 at 14:00 UTC, and negative numbers are dates before 1970. Because it is a single number in UTC, the same timestamp means the same instant in every time zone; only the way it is displayed changes.

Different systems use different units. Unix tools and most databases count seconds, JavaScript's Date.now() and Java's System.currentTimeMillis() return milliseconds, and some languages and logging systems use microseconds or nanoseconds. The converter guesses the unit from the size of the number: below 100 billion is read as seconds, which covers every date up to the year 5138.

How do I get the current timestamp in code?

In JavaScript use Math.floor(Date.now() / 1000) for seconds; in Python, int(time.time()); in PHP, time(); in a Linux or macOS shell, date +%s. In MySQL, UNIX_TIMESTAMP() returns the current time in seconds, and in PostgreSQL you can use extract(epoch from now()). Remember to divide or multiply by 1000 when you pass values between JavaScript and a system that counts seconds.

What is the year 2038 problem?

Older systems store Unix time in a signed 32-bit integer, which can hold at most 2147483647. That value is reached on 19 January 2038 at 03:14:07 UTC; one second later the number overflows and wraps to a date in 1901. Modern operating systems, databases and languages use 64-bit timestamps, which will not run out for billions of years, but embedded devices and old file formats can still be affected.

Frequently asked questions

Is a Unix timestamp in UTC or local time?

Always UTC. A timestamp is the number of seconds since midnight UTC on 1 January 1970, so it does not contain a time zone. The converter shows it as UTC and also in your own time zone, using your browser's settings.

How do I tell seconds from milliseconds?

By length. A current timestamp in seconds has 10 digits, in milliseconds 13, in microseconds 16 and in nanoseconds 19. Auto-detect uses these sizes and shows which unit it picked; choose the unit manually if your number is unusual, for example a date far in the past.

Why is my converted date in 1970?

Usually because a timestamp in seconds was read as milliseconds, which makes it about a thousand times too small and lands it in January 1970. Check the detected unit, or multiply seconds by 1000 before passing them to JavaScript's new Date().

Does Unix time include leap seconds?

No. Unix time treats every day as exactly 86,400 seconds and ignores leap seconds, so it is not a perfect count of elapsed seconds. For almost all applications that difference does not matter, and it keeps date calculations simple.

Which date and time does the Date to timestamp side use?

The date and time you pick are read in your own time zone, as shown by your device, and converted to a timestamp, which is then the same everywhere. The UTC line below shows the same moment in UTC so you can double-check the conversion.

Related tools