Unix Timestamp Converter

Convert a Unix timestamp to a readable date, or a date to epoch time, in any time zone. Seconds, milliseconds, microseconds and nanoseconds are detected automatically.

Current Unix time—— ms

 

Date and time

 

Date and time
—

Batch converter

Paste many timestamps or dates, one per line. Numbers become dates and dates become timestamps; the unit is detected on each line.

How to convert a Unix timestamp

  1. Type or paste a Unix timestamp in the left box. The tool works out whether it is in seconds (10 digits), milliseconds (13), microseconds (16) or nanoseconds (19). You can also choose the unit yourself.
  2. To convert a date to a timestamp, pick the date and time on the right. Whichever side you edit becomes the input, and the result shows the other one.
  3. Choose a time zone. Local time is your device’s zone. The list below the result shows the moment in that zone and in UTC, as ISO 8601, RFC 2822, an HTTP date, relative time and an Excel serial, each with its own copy button.
  4. Use the quick buttons for now, the start of the day, week, month or year, or to step by an hour or a day. To convert a whole column, paste it into the Batch converter and copy the results as CSV.

What is a Unix timestamp?

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, the Unix epoch. At the end of 2026 it is a 10-digit number close to 1.8 billion. Because it is a single number with no time zone attached, it is the way computers, databases, APIs and log files store moments in time. Turning it into a calendar date is only a display step, and that step depends on the time zone you want to see.

Seconds, milliseconds, microseconds and nanoseconds

Classic Unix tools, PHP, MySQL and Python’s time.time() count in seconds. JavaScript’s Date.now(), Java’s System.currentTimeMillis() and many JSON APIs use milliseconds, which adds three digits. Microseconds (16 digits) appear in PostgreSQL and some analytics tools, and nanoseconds (19 digits) in Go and high-resolution logs. This converter guesses the unit from the size of the number: anything up to 11 digits is read as seconds, which covers every date until the year 5138. For example, 1700000000 is 14 November 2023, 22:13:20 UTC, and 1700000000000 is the same moment in milliseconds.

Time zones, daylight saving and leap seconds

A timestamp is the same everywhere in the world; only its local reading changes. That is why converting a date back to a timestamp needs a time zone: 09:00 in Istanbul and 09:00 in New York are different moments. When clocks change for daylight saving time, some local times do not exist at all and others happen twice. The converter warns you in both cases and tells you which moment it picked. Unix time also ignores leap seconds: every day is exactly 86,400 seconds, so date arithmetic stays simple.

Negative timestamps and the year 2038 problem

Dates before 1970 have negative timestamps; −86400 is 31 December 1969. Older systems store Unix time as a signed 32-bit integer, whose largest value, 2147483647, is reached on 19 January 2038 at 03:14:07 UTC. One second later such a counter wraps around to December 1901. Modern operating systems and languages use 64-bit time, but embedded devices and old file formats may still be affected. Every conversion on this page runs in your browser; nothing is sent to a server.

Unix time in programming languages

How to get the current Unix timestamp in seconds, and how to turn a timestamp ts back into a date, in popular languages and tools.

LanguageCurrent timestampTimestamp → date
JavaScriptMath.floor(Date.now() / 1000)new Date(ts * 1000)
Pythonint(time.time())datetime.fromtimestamp(ts, timezone.utc)
PHPtime()date('c', $ts)
JavaInstant.now().getEpochSecond()Instant.ofEpochSecond(ts)
C#DateTimeOffset.UtcNow.ToUnixTimeSeconds()DateTimeOffset.FromUnixTimeSeconds(ts)
Gotime.Now().Unix()time.Unix(ts, 0)
RubyTime.now.to_iTime.at(ts)
SwiftInt(Date().timeIntervalSince1970)Date(timeIntervalSince1970: ts)
Bashdate +%sdate -d @1700000000 (GNU) · date -r 1700000000 (macOS)
PowerShell[DateTimeOffset]::UtcNow.ToUnixTimeSeconds()[DateTimeOffset]::FromUnixTimeSeconds(ts)
MySQLUNIX_TIMESTAMP()FROM_UNIXTIME(ts)
PostgreSQLEXTRACT(EPOCH FROM now())::bigintto_timestamp(ts)
SQLitestrftime('%s', 'now')datetime(ts, 'unixepoch')
Excel / Sheets=(NOW()-DATE(1970,1,1))*86400=A1/86400+DATE(1970,1,1)

Python needs import time and from datetime import datetime, timezone; Java uses java.time.Instant. In Excel, format the result cell as a date and time.

Frequently asked questions

What is the current Unix timestamp?

The live counter at the top of the page shows the current Unix time in seconds and milliseconds and updates every moment. On 31 October 2026 it is about 1,793,000,000. Use the Copy buttons to grab it, or press Now to convert it.

Is a Unix timestamp in UTC?

Yes. A Unix timestamp counts seconds from midnight UTC on 1 January 1970 and carries no time zone, so the same number means the same moment everywhere. Only when you display it as a date do you choose a zone, such as your local time or UTC.

Why does my timestamp convert to 1970 or a date far in the future?

The unit is wrong. A millisecond timestamp read as seconds lands tens of thousands of years in the future, and a seconds timestamp read as milliseconds lands in January 1970. Leave the unit on Auto, or pick seconds, milliseconds, microseconds or nanoseconds by hand.

How do I convert a Unix timestamp in Excel or Google Sheets?

Use =A1/86400+DATE(1970,1,1) and format the cell as a date and time. For milliseconds divide by 86400000 instead. The result is in UTC; add the hour offset divided by 24 for your time zone, for example +3/24 for Istanbul.

What happens to Unix time in 2038?

Systems that store the timestamp as a signed 32-bit number overflow at 2,147,483,647, which is 19 January 2038, 03:14:07 UTC. The next second would be read as 13 December 1901. Systems that use 64-bit time, which includes modern operating systems and languages, are not affected.