Skip to content
ToolPika

Unix Timestamp Converter

See the current Unix time, turn a timestamp into a readable date, or turn a date into a timestamp. Seconds and milliseconds are detected automatically.

Current Unix time

Timestamp to date

Date to timestamp

Runs in your browser. Nothing you enter is sent to a server.

How it works

Timestamp to date. The number is read as seconds or milliseconds since 1 January 1970 00:00:00 UTC. Numbers of 100,000,000,000 or more are treated as milliseconds, because in seconds they would be past the year 5000. The date is then shown in UTC, in your device’s time zone, as ISO 8601 (the format used by APIs and databases) and relative to now.

Date to timestamp. Enter a date and time and choose whether it is in your local time zone or in UTC. The same wall-clock time gives different timestamps in different time zones: 12:00 in Madrid and 12:00 in New York are usually six hours apart.

Negative timestamps are dates before 1970: −1 is 31 December 1969 at 23:59:59 UTC.

Notable timestamps

Timestamp (seconds) Date and time (UTC)
0 1 January 1970, 00:00:00
1,000,000,000 9 September 2001, 01:46:40
1,700,000,000 14 November 2023, 22:13:20
2,000,000,000 18 May 2033, 03:33:20
2,147,483,647 19 January 2038, 03:14:07 (the 32-bit limit)

Getting the current timestamp in code

Language Seconds
JavaScript Math.floor(Date.now() / 1000)
Python int(time.time())
PHP time()
Java Instant.now().getEpochSecond()
Shell (Linux, macOS) date +%s

In JavaScript, Date.now() alone returns milliseconds, which is the most common source of timestamps that are 1,000 times too large.

Frequently asked questions

What is a Unix timestamp?

The number of seconds since 1 January 1970 at 00:00:00 UTC, known as the Unix epoch. It is the same everywhere in the world at a given moment, which makes it a convenient way for computers to store and compare times.

Is my timestamp in seconds or milliseconds?

Current timestamps have 10 digits in seconds (1700000000) and 13 in milliseconds (1700000000000). The converter guesses from the size of the number and shows which unit it used; you can override it in the Unit menu.

What is the year 2038 problem?

Systems that store Unix time as a signed 32-bit integer can only count up to 2,147,483,647, which is 19 January 2038 at 03:14:07 UTC. One second later the value overflows. Modern systems use 64-bit timestamps, which will not run out for billions of years.

Do Unix timestamps count leap seconds?

No. Unix time assumes every day has exactly 86,400 seconds, so leap seconds are not counted. That keeps date arithmetic simple, and the difference from atomic time is only a few dozen seconds.