Unix Timestamp Converter

See the current Unix time live, turn any epoch timestamp into a local, UTC and ISO 8601 date, or convert a date and time in any time zone back into a timestamp.

100% freeNo sign-upRuns in your browserWorks on mobile
Current Unix time
0Seconds
0Milliseconds

Used to show and read local dates below. Defaults to your device’s time zone.

Timestamp to date

Date to timestamp

How to use the Unix Timestamp Converter

  1. Read the live Unix time at the top and copy it in seconds or milliseconds with one click.
  2. Pick a time zone if you want local results for somewhere other than your own location.
  3. Paste a timestamp under Timestamp to date. The unit is detected from its length, or you can choose seconds, milliseconds, microseconds or nanoseconds yourself.
  4. Under Date to timestamp, choose a date and time; it is read in the selected time zone and converted to seconds and milliseconds.
  5. Use the Copy buttons next to any row to grab a value for your code, logs or database query.

Features

  • Live current timestamp in seconds and milliseconds
  • Automatic seconds, milliseconds, microseconds or nanoseconds detection
  • Results in any IANA time zone, UTC, ISO 8601 and RFC 2822
  • Relative time such as “in 3 days” or “2 years ago”
  • Date to timestamp conversion that handles daylight saving changes
  • Exact handling of negative timestamps and sub-millisecond digits

What Unix time is

Unix time, also called epoch time or POSIX time, counts the seconds that have passed since 00:00:00 UTC on 1 January 1970, a moment known as the Unix epoch. It is a single number with no time zone, no daylight saving and no calendar rules attached, which makes it ideal for storing and comparing moments in software. Sorting events, measuring durations and checking whether a token has expired all become simple arithmetic. Dates before 1970 are written as negative numbers, so -1 is 23:59:59 UTC on 31 December 1969.

Unix time ignores leap seconds: every day is treated as exactly 86,400 seconds long. That keeps the arithmetic simple at the cost of a small, well-understood mismatch with atomic time.

Seconds, milliseconds or microseconds?

The classic Unix timestamp is in seconds, but many systems use finer units. JavaScript’s Date.now() and Java’s System.currentTimeMillis() return milliseconds, some databases and Python’s time.time_ns() work in micro- or nanoseconds. For dates in recent decades you can tell the unit from the number of digits, which is how this converter’s auto-detect works:

DigitsUnitExample for 1 Jan 2026 00:00 UTC
10Seconds1767225600
13Milliseconds1767225600000
16Microseconds1767225600000000
19Nanoseconds1767225600000000000

If a converted date lands in January 1970, a value in seconds was read as milliseconds. If it lands tens of thousands of years in the future, milliseconds were read as seconds.

Getting the current timestamp in code

LanguageSeconds since the epoch
JavaScriptMath.floor(Date.now() / 1000)
Pythonint(time.time())
PHPtime()
JavaInstant.now().getEpochSecond()
Gotime.Now().Unix()
Bashdate +%s
MySQLUNIX_TIMESTAMP()
PostgreSQLEXTRACT(EPOCH FROM now())

Time zones only matter for display

A timestamp identifies the same instant everywhere on Earth. The time zone selector in this tool changes only how that instant is written as a local date. When you convert a date back to a timestamp, the zone matters a great deal: 9:00 in Tokyo and 9:00 in New York are different instants, so the tool reads your date and time in the zone you selected. On days when clocks change, a local time can be skipped or happen twice; the tool tells you when the time you entered does not exist.

The year 2038 problem

Older systems store Unix time in a signed 32-bit integer, whose largest value is 2,147,483,647. That moment arrives at 03:14:07 UTC on 19 January 2038, after which such a counter overflows to a negative number and jumps back to December 1901. Modern operating systems, languages and databases use 64-bit time values, but embedded devices, old file formats and database columns declared as 32-bit integers still need checking.

Mistakes to avoid

  • Storing local time instead of UTC, which breaks sorting when daylight saving ends.
  • Mixing seconds and milliseconds between a backend and a JavaScript front end.
  • Parsing date strings without an explicit offset, so the result depends on the server’s time zone.

Frequently asked questions

What is the Unix epoch?

It is the starting point of Unix time: 00:00:00 UTC on 1 January 1970. A Unix timestamp is the number of seconds since that moment.

Is a Unix timestamp in UTC or local time?

It is always based on UTC and has no time zone of its own. The same timestamp shows different local times in different places, but it refers to one single instant.

How do I know if my timestamp is in seconds or milliseconds?

Count the digits. Present-day timestamps have 10 digits in seconds and 13 in milliseconds. Auto-detect uses this rule, and you can override it if needed.

Can a Unix timestamp be negative?

Yes. Negative values count backwards from 1970, so they represent earlier dates. This converter handles them in both directions.

What happens in 2038?

Systems that keep time in a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038. Software using 64-bit time, which includes current mainstream platforms, is not affected.

More developer tools

Other free tools you might need next.

View all 24