Unix Timestamp Converter

Turn a Unix epoch timestamp from a log line, an API response, or a database column into a date you can actually read — and go the other way just as easily. The unit is detected automatically, because the most common epoch bug by far is a value that is out by a factor of a thousand: 1700000000 is November 2023, while 1700000000000 is the same moment expressed in milliseconds, and pasting one where the other is expected lands you in 1970 or the year 55000. The detected unit is always shown, and you can override it. Every result is given in UTC, in your own timezone, in ISO 8601 and RFC 2822, and in any IANA timezone you pick, with the correct daylight-saving offset for that particular date. It runs entirely in your browser — useful, given that the timestamps developers paste into these tools usually come from production logs.

Telling the units apart by magnitude

UnitDigits todayExampleAs a date
Seconds10170000000014 Nov 2023, 22:13:20 UTC
Milliseconds13170000000000014 Nov 2023, 22:13:20 UTC
Microseconds16170000000000000014 Nov 2023, 22:13:20 UTC
Nanoseconds19170000000000000000014 Nov 2023, 22:13:20 UTC

When to use it

  1. Convert a timestamp from a log line into a readable local time.
  2. Check whether an API is returning seconds or milliseconds.
  3. Get the epoch value for a specific date to use in a query or a test fixture.
  4. See what an expiry timestamp in a token or cookie actually means.
  5. Compare an event time across several timezones at once.

How to Use

  1. Paste a Unix timestamp, or press Now for the current one.
  2. Check the detected unit and override it if the value is not what you expect.
  3. Read the date in UTC, your local time, ISO 8601 and RFC 2822.
  4. Or go the other way: pick a date and time to get its epoch value.

Features

  1. Timestamp to date and date to timestamp
  2. Automatic unit detection with manual override
  3. Seconds, milliseconds, microseconds and nanoseconds
  4. UTC, local, ISO 8601, RFC 2822 and any IANA timezone
  5. Relative time — 'three days ago'
  6. Live 'now' button and pre-epoch (negative) support
  7. 100% client-side — log data never leaves your device

FAQs

What is a Unix timestamp?

The number of seconds that have elapsed since midnight UTC on 1 January 1970, known as the Unix epoch. Because it is a single number with no timezone attached, it is unambiguous — which is exactly why logs, APIs and databases use it instead of formatted dates.

Seconds or milliseconds — how does it know?

From the magnitude. A current timestamp is about 1.7 billion in seconds, so a value in the hundreds of billions is almost certainly milliseconds, and each further thousandfold step is microseconds then nanoseconds. The tool shows which unit it picked and lets you override it, because guessing silently is how this goes wrong.

Why does my timestamp show a different time than I expected?

Usually a timezone or a unit mismatch. Check whether the number is in seconds or milliseconds, and compare the UTC row with the local row — a timestamp is always an instant in UTC, and the local rendering shifts by your offset, including daylight saving for that particular date.

Does it handle dates before 1970?

Yes. Timestamps before the epoch are negative, and they convert normally. JavaScript dates are valid for roughly 273,000 years either side of 1970; values beyond that report an error rather than showing a nonsense date.

What is the 2038 problem?

Systems that store the timestamp in a signed 32-bit integer overflow on 19 January 2038, wrapping to 1901. This tool uses JavaScript numbers, so it is unaffected — but it is worth knowing if you are working with older C code or embedded systems.

Is anything uploaded?

No. Conversion is local arithmetic and formatting. Timestamps you paste — which often come from production logs — are not sent to a server, logged, or stored.

Technical Details

A Unix timestamp counts the time elapsed since 1 January 1970 UTC, but different systems count it in different units, and a value that is wrong by a factor of a thousand is the single most common epoch mistake. The unit is therefore inferred from magnitude — a present-day value is around 1.7 x 10^9 in seconds, so each thousandfold step up is the next unit: milliseconds above 10^11, microseconds above 10^14, nanoseconds above 10^17 — and the detected unit is always shown and can be overridden. The value is scaled to milliseconds and passed to the JavaScript Date constructor, which is valid for roughly plus or minus 273,000 years around the epoch; anything outside that returns an explicit error rather than an Invalid Date. Output is rendered in UTC via toISOString, in the browser's own timezone, in RFC 2822 form for mail and HTTP headers, and in any IANA timezone using Intl.DateTimeFormat, which applies the correct historical offset and daylight-saving rule for that date. Relative phrasing uses Intl.RelativeTimeFormat so it is localised by the browser.

Time & Date Tools

Time & Date Tools

  • Add or Subtract Dates
  • Business Days Calculator
  • ISO Week Number
  • Time Duration Calculator
  • Date Format Converter
  • Hijri \u21c4 Gregorian
  • Leap Year Checker
  • Time Zone Converter