Convert4Me – Convert4Me home
Share

Unix Timestamp Converter

Convert a Unix timestamp (epoch time) to a date and a date to a timestamp, in seconds, milliseconds, microseconds or nanoseconds. See the current Unix time ticking live. Everything runs in your browser.

The current Unix time

…

Timestamp to date

Unit

Date to timestamp

Timestamps you may recognise

Timestamp (seconds)Date and time (UTC)
01 January 1970, 00:00:00 (the epoch)
10000000009 September 2001, 01:46:40
170000000014 November 2023, 22:13:20
200000000018 May 2033, 03:33:20
214748364719 January 2038, 03:14:07 (the 32-bit limit)

How to get the current timestamp

Language or toolCode
JavaScriptMath.floor(Date.now() / 1000)
Pythonimport time; int(time.time())
PHPtime()
JavaInstant.now().getEpochSecond()
MySQLSELECT UNIX_TIMESTAMP();
PostgreSQLSELECT EXTRACT(EPOCH FROM now());
Linux and macOS terminaldate +%s
Excel=(NOW()-DATE(1970,1,1))*86400 (UTC)

Seconds, milliseconds and other units

  • 10 digits: seconds. Used by Unix, PHP, Python and many APIs.
  • 13 digits: milliseconds. Used by JavaScript, Java and many web services.
  • 16 digits: microseconds. Used in some databases and logs.
  • 19 digits: nanoseconds. Used by Go and high-precision timers.

How to use the Unix Timestamp Converter tool

  1. To read a timestamp, type it in the first box. The unit (seconds, milliseconds ...) is detected for you.
  2. To get a timestamp, pick a date and time and choose your time zone or UTC.
  3. Press a copy button to copy any result.

Frequently asked questions

What is a Unix timestamp?

A Unix timestamp, or epoch time, is the number of seconds that have passed since 1 January 1970 at 00:00:00 UTC. It gives one number for a moment in time that means the same everywhere, which is why programs and databases use it.

How do I tell seconds from milliseconds?

Count the digits. Today's timestamps in seconds have 10 digits (for example 1700000000), in milliseconds 13 digits, in microseconds 16 and in nanoseconds 19. With the unit on Automatic, the tool picks the right one.

How do I convert a Unix timestamp to a date?

Multiply by 1,000 if it is in seconds, then pass it to a date function. In JavaScript: new Date(1700000000 * 1000). In Python: datetime.fromtimestamp(1700000000, tz=timezone.utc). Or paste it above and read the date.

Does a Unix timestamp have a time zone?

No. It always counts from the same moment in UTC, so it is the same number everywhere. Time zones only matter when you turn it into a date to show to a person, which is why this tool shows both UTC and your own time zone.

What is the year 2038 problem?

Systems that store a timestamp in a signed 32-bit integer can only count up to 2,147,483,647 seconds, which is 19 January 2038 at 03:14:07 UTC. After that the number overflows. Modern systems use 64-bit integers, which will not overflow for hundreds of billions of years.

Guides

Your privacy comes first. Your text and numbers stay in your browser and we never see them. If you allow it, we save what you type on this device and use Google Analytics to count visits. We never sell your data. Privacy Policy