Unix Timestamp to Date

Paste an epoch value and read it back as a date. The unit is detected automatically, and the result is shown in your local zone, any zone you pick, and UTC at the same time.

Unix timestamp to date

Auto-detect reads the magnitude: 10 digits are seconds, 13 milliseconds, 16 microseconds, 19 nanoseconds.

Converted date and time formats
Your local time
Selected time zone
UTC / GMT
ISO 8601
RFC 2822
Relative
Day of week
Day of year / week

Reading the output rows

Each row answers a different question, and mixing them up is a common source of confusion in bug reports:

  • Your local time — the instant as your own machine would display it, using the zone your browser reports.
  • Selected time zone — the same instant in whichever zone you chose, with the offset that applied on that date.
  • UTC / GMT — the canonical form. When you file a bug or write a log, quote this one.
  • ISO 8601 — the machine-readable interchange format, e.g. 2024-03-10T07:30:00+05:30. Safe to put in JSON.
  • RFC 2822 — the format used in email headers, e.g. Sun, 10 Mar 2024 07:30:00 +0530.
  • Relative — how long ago or how far ahead the instant is, which makes stale cache entries and expired tokens obvious at a glance.

The three failure modes worth memorising

Nearly every timestamp bug you will ever debug is one of these:

  1. Wrong unit. Seconds and milliseconds differ by a factor of 1000, and both are plausible-looking integers. The symptom is a date in 1970 or a date tens of thousands of years away.
  2. Wrong zone assumption. The timestamp itself has no zone — it is always UTC. The bug is in the formatting layer that renders it, usually a server defaulting to its own local zone instead of the user's.
  3. Wrong width. A 32-bit column silently truncates dates past January 2038. See the Year 2038 problem.

Doing this in code

If you need the conversion inside a program rather than in a browser, the one-liners for every major language are on the code examples pages — including the exact call for Python, JavaScript, PHP, Go and Java.

Related tools

Frequently asked questions

How do I convert a Unix timestamp to a date?

Paste the number into the box above. The converter detects whether it is in seconds, milliseconds, microseconds or nanoseconds from its digit count, then shows the result in your local zone, a zone of your choosing and UTC simultaneously.

Why does my timestamp convert to 1 January 1970?

A result at or near the epoch almost always means the value was zero, empty, or a millisecond value that got divided instead of multiplied. It can also mean a string was silently coerced to 0. Check the raw value before assuming the date is wrong.

Why does my timestamp convert to a date in the year 55000?

You passed milliseconds to something expecting seconds. A 13-digit millisecond value read as seconds lands roughly 53,000 years out. Switch the unit dropdown to Milliseconds, or divide by 1000.

Can a Unix timestamp be negative?

Yes. Negative values represent instants before 1 January 1970 — for example -86400 is 31 December 1969. Some languages and databases reject negatives, which is a common source of bugs with historical dates such as birth dates.

Does the converter handle daylight saving time?

Yes, and it applies the rules that were in force on the converted date rather than the rules in force today. A timestamp from July in New York shows EDT (UTC−04:00), while one from January shows EST (UTC−05:00).