Free SEO Tools

All tools

Unix Timestamp Converter

Convert an epoch timestamp in seconds or milliseconds into a readable date, or turn a date and time back into a timestamp.

Timestamp to date

Date to timestamp

How to convert a timestamp

The tool has two halves. The top half turns a Unix timestamp into a date, and the bottom half turns a date into a timestamp.

  1. Paste a timestamp into the Unix timestamp box, or press Use the current time. Results update as you type.
  2. Leave the unit on Detect automatically unless you know better. Values of 100,000,000,000 or more are read as milliseconds, and smaller values as seconds.
  3. Read the table: the date in UTC, the same moment in ISO 8601 format, your own local time, how long ago or how far ahead it is, and the value in both seconds and milliseconds.
  4. To go the other way, pick a date and time in the lower half and choose whether they are UTC or your local time. The timestamp appears immediately in seconds and milliseconds.

Worked example

A log file contains the value 1700000000. Paste it in and the tool reports that it was read as seconds, with a UTC time of Tue, 14 Nov 2023 22:13:20 GMT and an ISO value of 2023-11-14T22:13:20.000Z. The "Z" at the end means UTC.

Next, a JavaScript app stores 1767225600000, which has thirteen digits. The tool detects milliseconds and shows Thursday, 1 January 2026 at 00:00:00 UTC, with 1767225600 in the seconds row. To check this from the other direction, set the lower date to 1 January 2026, the time to 00:00 and the zone to UTC. The result is 1767225600 seconds, which matches.

How it works

A Unix timestamp counts the seconds since midnight UTC on 1 January 1970, known as the Unix epoch. JavaScript and many web services count milliseconds instead, which is why those values are a thousand times larger. The tool multiplies or divides by 1,000 as needed, then uses your browser's date functions to format the result. Local times use the time zone your device is set to, including British Summer Time when it applies. Nothing is sent to a server, so the converter also works offline once the page has loaded.

Seconds or milliseconds?

Count the digits. A present-day timestamp in seconds has ten digits, while one in milliseconds has thirteen. PHP, Python, MySQL and most Linux tools normally use seconds. JavaScript's Date.now(), Java and many analytics platforms use milliseconds. If a converted date lands in 1970, or tens of thousands of years in the future, you almost certainly have the wrong unit.

Tips

  • Store and exchange times in UTC, then convert to local time only when showing them to people. This avoids confusion when the clocks change.
  • Remember that UK local time is one hour ahead of UTC from late March to late October.
  • When comparing two systems, convert both values here and check they refer to the same moment, not just the same clock time.
  • Negative timestamps are valid and represent dates before 1970, so a birth date in the 1960s gives a negative number.
  • Bookmark this page if you debug logs often. It loads instantly and works without an internet connection.

Frequently asked questions

What is the year 2038 problem?

Older systems store seconds in a 32-bit number, which runs out on 19 January 2038. Modern 64-bit systems and this tool are not affected.

Do timestamps include leap seconds?

No. Unix time treats every day as exactly 86,400 seconds, so leap seconds are ignored.

Why does my local time differ from UTC?

Your device's time zone and any daylight saving rule shift the clock time, even though the underlying moment is the same.

Where will I come across Unix timestamps?

They appear in server logs, database exports, API responses, cookie expiry values, JSON Web Tokens and spreadsheet exports from many web services. Converting them here is quicker than writing a formula.

Is any data uploaded?

No. All conversions happen in your browser, and nothing you enter is stored.