Unix Timestamp Converter – Epoch Time to Date and Back

See the current Unix timestamp, convert any timestamp to a readable date in UTC and your time zone, or turn a date and time into a timestamp.

Runs in your browser 100% free No sign-up
Quick answer

Paste a timestamp to see the date — the tool detects whether it is in seconds, milliseconds, microseconds or nanoseconds. For the reverse, pick a date and time, choose your local time or UTC and copy the timestamp in seconds or milliseconds.

How to use Unix Timestamp Converter

  1. Read the current Unix timestamp at the top; it updates every second.
  2. To convert a timestamp, paste it into the timestamp box.
  3. Check the detected unit and the date in UTC, in your time zone and in ISO 8601.
  4. To convert a date, pick the date and time and choose “My local time” or “UTC”.
  5. Copy the timestamp in seconds or milliseconds.

What is Unix time?

Unix time (also called epoch time or POSIX time) counts the seconds that have passed since 1 January 1970, 00:00:00 UTC, the “Unix epoch”. It is a single number with no time zone, which makes it ideal for storing and comparing moments in databases, logs and APIs. For example, the timestamp 1700000000 was 14 November 2023 at 22:13:20 UTC.

Seconds, milliseconds, micro- and nanoseconds

Digits (today)UnitTypical source
10secondsUnix, PHP time(), MySQL UNIX_TIMESTAMP()
13millisecondsJavaScript Date.now(), Java
16microsecondsPython time.time_ns() / 1000, PostgreSQL
19nanosecondsGo, InfluxDB

The converter guesses the unit from the size of the number, so you can paste values from any language.

Time zones and daylight saving

A timestamp is always UTC. Only when you show it to a person does a time zone come into play. The converter displays the date in UTC and in the time zone of your device, including daylight saving time. When converting a date back, choose whether the date you typed is your local time or UTC — the difference can be several hours.

Leap seconds and the year 2038

Unix time ignores leap seconds: every day has exactly 86,400 seconds. Systems that store timestamps as signed 32-bit integers will overflow on 19 January 2038 at 03:14:07 UTC — the “Year 2038 problem”. Modern systems use 64-bit numbers, which last for billions of years.

Timestamps in code

  • JavaScript: Math.floor(Date.now() / 1000)
  • Python: int(time.time())
  • PHP: time()
  • MySQL: UNIX_TIMESTAMP(), and FROM_UNIXTIME(1700000000) for the reverse

Why developers prefer timestamps

A timestamp is easy to compare, sort and subtract: the difference between two timestamps is simply the number of seconds between them. There are no month names, date formats or time-zone abbreviations to parse, which removes a whole class of bugs. Convert to a readable date only at the very end, when you display it to a user in their own time zone.

Generating time-ordered IDs? A UUID v7 contains a millisecond timestamp too.

You may also find these free tools useful: JSON Formatter, Password Generator and Regex Tester.

Frequently asked questions

What is the current Unix timestamp?

It is shown live at the top of the tool and updates every second, in both seconds and milliseconds.

How do I convert a Unix timestamp to a date?

Paste it into the timestamp box. The tool detects the unit and shows the date in UTC, in your local time and in ISO 8601 format.

Is a Unix timestamp in seconds or milliseconds?

Classic Unix time is in seconds (10 digits today). JavaScript and Java use milliseconds (13 digits). The converter detects both automatically.

Does Unix time depend on the time zone?

No. A timestamp is the same everywhere in the world; only the readable date you display from it depends on the time zone.

What is the Year 2038 problem?

Signed 32-bit timestamps overflow on 19 January 2038 at 03:14:07 UTC. Systems that use 64-bit timestamps are not affected.

Last updated: