CalcMint

Unix Timestamp Converter

Paste an epoch time from a log, database or API to see the date, or pick a date to get its timestamp. The unit is detected from the number of digits.

Unix timestamp converter

Current Unix time

Seconds

 

Milliseconds

 

Timestamp → date

Date → timestamp

Add this calculator to your website

Copy the code and paste it into your page's HTML. It's free; please keep the credit link.

Converting in code

  • JavaScript: Math.floor(Date.now() / 1000) and new Date(seconds * 1000)
  • Python: int(time.time()) and datetime.fromtimestamp(seconds, tz=timezone.utc)
  • PHP: time() and date('c', $seconds)
  • SQL (PostgreSQL): extract(epoch from now()) and to_timestamp(seconds)
  • Shell: date +%s, and date -d @1700000000 (Linux) or date -r 1700000000 (macOS)

Notable timestamps

SecondsUTCWhy it matters
01970-01-01 00:00:00Unix epoch
10000000002001-09-09 01:46:40First 10-digit timestamp
12345678902009-02-13 23:31:30Easy to remember
21474836472038-01-19 03:14:0732-bit overflow (Year 2038 problem)
41024448002100-01-01 00:00:00Year 2100

Frequently asked questions

What is a Unix timestamp?

The number of seconds since 1 January 1970 00:00:00 UTC, not counting leap seconds. It's the same everywhere in the world, so it has no time zone; the zone only matters when you show it as a date.

Seconds or milliseconds?

Unix tools, PHP, Python's time.time() and JWTs use seconds (10 digits today). JavaScript's Date.now() and Java's System.currentTimeMillis() use milliseconds (13 digits). Some databases and Go use microseconds or nanoseconds.

What is the Year 2038 problem?

Systems that store the timestamp as a signed 32-bit integer can count only up to 2,147,483,647, which is 19 January 2038 03:14:07 UTC. One second later the number wraps to a negative value, a date in December 1901. 64-bit timestamps don't have this problem.

Is what I paste sent to a server?

No. This tool runs entirely in your browser with JavaScript and the built-in Web Crypto API. Nothing you type, paste or open is uploaded or stored.

Related calculators