Unix Timestamp Converter

Convert between Unix timestamps and human-readable dates in either direction.

Related Tools

0 comments

How it works

A Unix timestamp counts seconds (or milliseconds) since 1970-01-01T00:00:00Z, the Unix epoch. To go from timestamp to date the value is fed into new Date(ms) — Date wants milliseconds, so seconds are multiplied by 1000 first. The result is rendered both as an ISO 8601 UTC string and in your browser's local time zone, with the offset shown explicitly. Going the other way, a parsed date returns getTime() in ms; divide by 1000 for seconds.

Common use cases

  • Decoding the iat or exp claim from a JWT into a readable date.
  • Logging timing data in seconds and converting it back during analysis.
  • Translating database timestamps stored in epoch ms back to dates.

Frequently asked questions

Seconds or milliseconds?

Toggle between the two. Most Unix-style timestamps are seconds; JavaScript and most modern systems prefer milliseconds. Length is a giveaway: 10 digits → seconds, 13 → ms.

What about 32-bit overflow (year 2038)?

JavaScript uses double-precision numbers, so 2038 is not a problem here. The output works far beyond it, though some downstream systems may not.

Are time zones handled?

Yes — both UTC and local time are shown side-by-side, with the local offset displayed.

Negative timestamps?

Supported — Date handles dates before 1970 as long as they fit in the safe integer range.