Unix Timestamp Converter

Turn a Unix timestamp into a readable date in UTC or any time zone, or turn a date back into epoch time. The Unix timestamp converter detects seconds, milliseconds, microseconds, and nanoseconds.

Updated
Runs in your browser. Nothing is sent to a server.
Now, in seconds
–
Now, in milliseconds
–

Starts with your browser's time zone. Offsets in brackets are for today, so they include daylight saving time where it applies.

Timestamp → date

ISO 8601 (UTC)
–
Your time zone
–
Selected time zone
–
RFC 2822
–
Relative
–

Date → timestamp

Unix timestamp (seconds)
–
Unix timestamp (milliseconds)
–

How to use the Unix Timestamp Converter

  1. In Timestamp → Date, paste a timestamp. Leave the unit on auto-detect or pick one. Press Now to load the current time.
  2. In Date → Timestamp, pick a date and time and choose a Time zone.
  3. Press Convert. You get the ISO date in UTC, local and zoned times, RFC 2822, and a relative time, or the timestamp in seconds and milliseconds. Copy any value.

How it works

A Unix timestamp counts the seconds since 00:00:00 UTC on January 1, 1970, ignoring leap seconds. Negative values are dates before 1970.

When the unit is set to auto-detect, it is chosen by the number of digits, ignoring any minus sign:

  • up to 11 digits: seconds
  • 12 to 14 digits: milliseconds
  • 15 to 17 digits: microseconds
  • 18 or more digits: nanoseconds

The detected unit is always shown, and you can override it. Large values are read as BigInt before scaling, so nanosecond timestamps keep their precision. Time zones use the IANA database through Intl.DateTimeFormat, so daylight saving time is applied correctly for each zone.

Systems that store the timestamp as a signed 32-bit number can only count up to 2,147,483,647 seconds. That limit is reached at 03:14:07 UTC on January 19, 2038, which is known as the year 2038 problem.

Examples

  • 1700000000 (seconds) = 2023-11-14T22:13:20Z. That is Nov 15, 2023, 01:43:20 in Asia/Tehran, and Nov 14, 2023, 17:13:20 in America/New_York.
  • 0 = 1970-01-01T00:00:00Z, the Unix epoch.
  • 2147483647 = 2038-01-19T03:14:07Z, the last second a signed 32-bit timestamp can hold.
  • 2026-09-25 00:00:00 UTC = 1790294400 seconds.

Getting the current Unix time in code

LanguageSeconds since the epoch
JavaScriptMath.floor(Date.now() / 1000)
Pythonint(time.time())
PHPtime()
PostgreSQLextract(epoch from now())
Bashdate +%s

JavaScript's Date.now() returns milliseconds, which is why timestamps from browsers usually have 13 digits instead of 10.

Limitations

  • Dates must fall between the years 1000 and 9999.
  • Auto-detect guesses from the digit count. A very small millisecond value, such as 5000, is read as seconds unless you change the unit.
  • A local time that doesn't exist or happens twice because of a daylight saving change shows a note naming the offset that was used.
  • Leap seconds are not counted, matching how Unix time works.

Frequently asked questions

What is a Unix timestamp?

The number of seconds since 00:00:00 UTC on January 1, 1970, not counting leap seconds. It is the same everywhere in the world, regardless of time zone.

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

Current timestamps in seconds have 10 digits, and in milliseconds they have 13. The converter detects this automatically and shows which unit it used.

What is the year 2038 problem?

Systems that store timestamps as signed 32-bit integers overflow after 03:14:07 UTC on January 19, 2038. Modern systems use 64-bit values and are not affected.

Does the converter handle daylight saving time?

Yes. Dates are converted with the official time zone database, so DST changes are applied for each zone.

Often used together with the Unix Timestamp Converter.