Skip to content
Free · Runs in your browser

Unix Timestamp Converter

Convert Unix timestamps to readable dates and dates back to epoch time. Seconds, milliseconds, microseconds and nanoseconds are detected automatically, and every result is shown in UTC and in your own time zone.

Current Unix time

—

Timestamp to date

Seconds, milliseconds, microseconds or nanoseconds since 1 January 1970 UTC.

Date to timestamp

ISO 8601 (2026-11-13T14:30:00Z, 2026-11-13 14:30) or an RFC 2822 date.

A date without a time zone means

What a Unix timestamp is

Unix time counts the seconds since the Unix epoch, 00:00:00 UTC on 1 January 1970. The value 0 is that moment, 86400 is exactly one day later, and negative numbers are dates before 1970. Because it is a single number with no time zone, it is the simplest way for computers to store and compare moments, and the same instant has the same timestamp everywhere on Earth.

It is what you see in database columns, log lines, JWT claims such as exp (decode one with the JWT decoder), HTTP caching headers and file modification times. The converter above turns those numbers into dates you can read, and turns dates back into numbers for queries and test data.

Seconds, milliseconds, microseconds or nanoseconds?

Different systems count in different units, and mixing them up is one of the most common date bugs. A timestamp from today has about this many digits:

  • 10 digits, seconds: Unix shells (date +%s), PHP time(), Python int(time.time()), PostgreSQL extract(epoch …), JWT claims.
  • 13 digits, milliseconds: JavaScript Date.now(), Java System.currentTimeMillis(), many JSON APIs and analytics tools.
  • 16 digits, microseconds: some databases, Python’s time.time_ns() // 1000 and tracing systems.
  • 19 digits, nanoseconds: Go’s UnixNano(), Linux kernel timestamps and many observability tools.

The converter guesses the unit from the number of digits and says which one it chose. If a date lands in January 1970 or tens of thousands of years in the future, the unit is wrong: pick it by hand. Values in micro- and nanoseconds are converted without losing digits.

Time zones, UTC and ISO 8601

A timestamp has no time zone; it is shown in one. The table lists the same instant in UTC, in ISO 8601 format (2026-11-13T14:30:00.000Z, where Z means UTC), as an HTTP date and in your browser’s time zone.

When you convert a date to a timestamp, a date without an offset is ambiguous: 2026-11-13 14:30 is a different moment in London and in Karachi. Choose whether such dates mean UTC or your local time, or include the offset (+05:00 or Z) so there is no doubt. Store and transmit times in UTC and convert to local time only for display. That rule avoids most time zone and daylight saving bugs.

The year 2038 problem

Systems that store Unix time in a signed 32-bit integer can count up to 2147483647, which is 03:14:07 UTC on 19 January 2038. One second later the value overflows to a large negative number, which reads as December 1901. Modern 64-bit systems, current databases and JavaScript are not affected, but embedded devices, old file formats and database columns declared as 32-bit integers still are.

You can try it: enter 2147483647 above to see the last safe second. If you design a schema today, store timestamps as 64-bit integers or as a native timestamp type.

Leap seconds and other edge cases

  • Leap seconds are ignored. Unix time treats every day as exactly 86,400 seconds. When a leap second is added, the same timestamp repeats or the clock is smeared over several hours, depending on the system. Subtracting two timestamps can therefore be off by a few seconds against atomic time, which matters only for scientific work.
  • Dates before 1970 are negative timestamps. Most languages handle them, but some older libraries and spreadsheets reject them.
  • Spreadsheets use a different epoch. Excel and Google Sheets count days since 1899 or 1900, not seconds since 1970, so convert with =(A1/86400)+DATE(1970,1,1).
  • Scheduled jobs are written in local wall-clock time, not timestamps. Check when a crontab entry will really run with the cron expression explainer.

Frequently asked questions

How do I get the current Unix timestamp?

It is shown live at the top of this tool. In code: date +%s in a shell, Math.floor(Date.now() / 1000) in JavaScript, int(time.time()) in Python, time() in PHP and Instant.now().getEpochSecond() in Java.

How do I convert milliseconds to seconds?

Divide by 1,000 and round down. A 13-digit timestamp is almost always milliseconds; the converter detects this automatically from the number of digits.

Is a Unix timestamp in UTC?

Yes. It counts seconds since midnight UTC on 1 January 1970, so it is the same everywhere. Only its display as a calendar date depends on a time zone.

Why does my date show 1970?

The value is in the wrong unit, usually seconds read as milliseconds, so a 2026 timestamp becomes a date a few weeks after 1 January 1970. Choose Seconds as the unit, or multiply by 1,000 before passing it to a function that expects milliseconds.

What happens in 2038?

At 03:14:07 UTC on 19 January 2038 the timestamp passes 2,147,483,647, the largest signed 32-bit integer. Systems that still store time in 32 bits will overflow; 64-bit systems will not.

Does this tool send my data anywhere?

No. All conversions run in your browser. Nothing you enter is uploaded or stored.

All tools

Need something bigger than a browser tool?

We design and build web apps, internal tools, APIs and cloud infrastructure for teams that need them done properly. Tell us what you are working on.