Unix Timestamp Converter

A Unix timestamp, also called epoch time or POSIX time, is simply the number of seconds that have elapsed since 1 January 1970 at 00:00:00 UTC. It is the universal standard that operating systems, databases and programming languages use to store and compare moments in time. Because it is a single integer with no time zone embedded, it sidesteps all the complications of daylight saving time, local offsets and calendar drift: two systems anywhere in the world comparing the same Unix timestamp are always looking at the same instant. You encounter Unix timestamps constantly in software development: in server logs, in database records, in API responses, in file system metadata. This converter works in both directions. In the first mode, you enter a Unix timestamp in seconds and the tool decodes it to a human-readable date and time in both UTC and your local browser time zone. The current timestamp is shown and updated live so you can see the seconds ticking over. In the second mode, you enter a date and time (in your local time zone, as your browser interprets it) and the tool converts it to the corresponding Unix timestamp in seconds. The worked example uses the timestamp 1719230400, which corresponds to 2024-06-24 12:00:00 UTC. You can also click the button to paste the current timestamp into the input field.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Premium Homes: got a section? Let's build your eco home on it.
Advertise on this page
2024-06-24
date (UTC)
UTC date and time2024-06-24 12:00:00 UTC
Local date and time2024-06-25 00:00:00 local
Day of weekMonday
Current epoch1786076823

UTC = Coordinated Universal Time. Local time is your browser's local time zone. For date-to-timestamp, the date entered is treated as local time.

How it works

The calculator uses the JavaScript Date object to convert between timestamps and dates. For timestamp to date: new Date(timestamp * 1000) creates a Date object (JavaScript uses milliseconds internally). The UTC date and time are read using toISOString() and the local date using toLocaleString(). For date to timestamp: new Date(dateString).getTime() / 1000 converts a date string to epoch seconds. The current timestamp is Math.floor(Date.now() / 1000), updated every second.

Worked example

Timestamp 1719230400 seconds: dividing by 86400 (seconds per day) gives the number of days since 1 Jan 1970. Converting via JavaScript's Date object gives 2024-06-24 12:00:00 UTC. In New Zealand Standard Time (UTC+12 in winter), this is 2024-06-25 00:00:00 NZST. The day of the week is Monday. These match the defaults pre-filled in the calculator above.

Related calculators