Unix Timestamp Converter

Paste a timestamp to see the date, or pick a date to get its timestamp. The current Unix time is shown live.

Loading tool…

  • Free
  • No sign-up
  • Runs in your browser

How to use the unix timestamp converter

  1. To decode: paste a timestamp in the Unix timestamp box. Seconds and milliseconds are detected automatically.
  2. To encode: choose a date and time, and read the timestamp.
  3. Press Copy next to the format you need.
  4. Press Use current time to fill in this moment.

What is Unix time?

Unix time, also called epoch time or POSIX time, is the number of seconds that have passed since 00:00:00 UTC on 1 January 1970. Because it is a single number with no time zone, it is the usual way for computers to store and compare moments in time. The same instant has the same timestamp everywhere in the world.

Seconds or milliseconds?

DigitsUnitUsed by
10SecondsUnix and Linux, PHP, Python, most databases and APIs
13MillisecondsJavaScript, Java, many logging systems
16MicrosecondsSome databases and analytics exports
19NanosecondsGo, high-precision logs

Reference values

TimestampDate (UTC)
01 January 1970, 00:00:00
10000000009 September 2001, 01:46:40
150000000014 July 2017, 02:40:00
170000000014 November 2023, 22:13:20
200000000018 May 2033, 03:33:20
214748364719 January 2038, 03:14:07

The year 2038 problem

Older systems store the timestamp as a signed 32-bit number, which can count no higher than 2,147,483,647. One second after 03:14:07 UTC on 19 January 2038, such a counter wraps around to a negative number and the date appears to jump back to 1901. Modern systems use 64-bit numbers, which will last for about 292 billion years.

Get the current timestamp in code

LanguageCode
JavaScriptMath.floor(Date.now() / 1000)
Pythonimport time; int(time.time())
PHPtime()
JavaSystem.currentTimeMillis() / 1000
Gotime.Now().Unix()
RubyTime.now.to_i
SQL (MySQL)SELECT UNIX_TIMESTAMP();
SQL (PostgreSQL)SELECT EXTRACT(EPOCH FROM NOW());
Bashdate +%s

Useful intervals in seconds

A minute is 60, an hour 3,600, a day 86,400, a week 604,800 and a 365-day year 31,536,000.

Frequently asked questions

What is the epoch?

The starting point of Unix time: midnight UTC at the start of 1 January 1970.

Does Unix time include leap seconds?

No. Every day is counted as exactly 86,400 seconds, and leap seconds are ignored.

Are timestamps affected by time zones?

No. A timestamp is always based on UTC. Time zones only matter when it is displayed as a date.

Can a timestamp be negative?

Yes. Negative values are dates before 1970.

Related tools