Skip to content
Language:en

Unix timestamp converter

Convert Unix epoch time to a readable date and back, in seconds or milliseconds.

Current Unix time—

Timestamp → date

ISO 8601
—
UTC
—
Your time zone
—
Relative
—

Date → timestamp

Seconds
—
Milliseconds
—

Runs entirely in your browser. Your files never leave your device.

About this tool

Logs, databases and APIs store dates as Unix timestamps: the number of seconds elapsed since 1 January 1970 at midnight UTC. Paste one here to read it as an ISO 8601 date, in UTC and in your own time zone, with a relative description such as “3 days ago”. The unit is detected from the number of digits, so JavaScript milliseconds and microseconds work too.

The second panel does the reverse: pick a date and time, local or UTC, and get the timestamp in seconds and milliseconds. The current epoch time ticks at the top of the tool for quick copying.

How it works

  1. Paste a timestamp, or press “Use current time”.
  2. Keep automatic unit detection or force seconds, milliseconds or microseconds.
  3. Read the ISO, UTC, local and relative dates.
  4. To go the other way, pick a date, choose local time or UTC and copy the timestamp.

Up to 11 digits are read as seconds, 12 to 14 as milliseconds and more as microseconds. Dates are formatted by your browser in your language and time zone, daylight saving time included.

Worked example

A log line shows 1700000000: that is 14 November 2023 at 22:13:20 UTC. The same moment written by JavaScript has 13 digits, 1700000000000, and is detected as milliseconds automatically.

Going the other way, 1 January 2027 at 00:00 UTC is 1798761600 seconds.

Good to know

  • Store timestamps in UTC and convert to local time only for display.
  • Ten digits are seconds, thirteen are milliseconds, sixteen microseconds.
  • 32-bit signed timestamps overflow on 19 January 2038 at 03:14:07 UTC; use 64-bit values in new systems.

Frequently asked questions

What is the Unix epoch?
It is 1 January 1970, 00:00:00 UTC, the reference point of Unix time. A timestamp counts the seconds since then, ignoring leap seconds.
Seconds or milliseconds?
Unix tools, PHP and most databases use seconds (10 digits today). JavaScript’s Date.now() and Java use milliseconds (13 digits). Automatic detection handles both.
What is the year 2038 problem?
Systems that store timestamps as signed 32-bit integers overflow on 19 January 2038 at 03:14:07 UTC (2147483647). Modern systems use 64 bits and are not affected.
Can I enter a date before 1970?
Yes, earlier dates give negative timestamps, and negative values are accepted in the first field.