Unix Timestamp (Milliseconds) Converter

Convert Unix epoch milliseconds to/from human-readable date-time

Free Unix timestamp converter for milliseconds since the epoch. Convert a 13-digit millisecond timestamp to an ISO-8601 UTC and local date-time, and convert any date-time back to epoch milliseconds. Runs entirely in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is a millisecond Unix timestamp?

It is the number of milliseconds elapsed since 1970-01-01T00:00:00Z. This is exactly what JavaScript's Date.now() and Date.getTime() return, and a present-day value is about 13 digits long.

A Unix timestamp in milliseconds is the number of milliseconds since 1970-01-01T00:00:00Z. It is the native time unit in JavaScript: Date.now() and Date.prototype.getTime() both return milliseconds, which is why millisecond timestamps appear constantly in web logs, API responses, database records, and front-end code. This converter decodes those values into readable dates and encodes dates back into milliseconds, all locally.

How it works

JavaScript’s Date constructor takes milliseconds directly, so decoding is straightforward:

const date = new Date(epochMilliseconds);
date.toISOString(); // UTC ISO-8601, e.g. "2023-11-14T22:13:20.000Z"
date.toString();    // Local time in your browser's timezone

To encode a date-time back to milliseconds, the tool parses the input string and reads .getTime() — no manual scaling needed. Both conversions run entirely in your browser using the built-in Date API.

A present-day millisecond timestamp is about 13 digits (for example 1700000000000). If your value is only about 10 digits it is in seconds and will decode to a date roughly 50 years in the future if treated as milliseconds. Check the digit count first.

The 10-digit vs 13-digit trap

This is by far the most common mistake with Unix timestamps. The confusion arises because older Unix tools, many databases, and shell utilities (date +%s) all work in seconds, while JavaScript, Java, and many modern APIs default to milliseconds.

ValueDigitsUnitWhat it represents
170000000010seconds2023-11-14 (correct)
170000000000013milliseconds2023-11-14 (correct)
1700000000 treated as ms10wrong unit1970-01-20 (off by ~53 years)

If you paste a 10-digit value and the decoded date is in January 1970, you have a seconds timestamp. Use the seconds converter for that case.

Where millisecond timestamps appear in practice

  • JavaScript APIsDate.now(), performance.now() (relative), setTimeout, most event timestamps
  • Database columns — MongoDB’s ObjectId encodes creation time; many SQL schemas store BIGINT epoch-ms
  • Log files — structured loggers (Winston, Pino, etc.) emit ISO strings or epoch-ms by default
  • REST APIs — payment webhooks, analytics events, and auth tokens often use epoch-ms in JSON payloads
  • Browser storagelocalStorage values representing expiry or creation times

Tips and edge cases

  • The three trailing digits in a millisecond timestamp encode the sub-second portion (0–999 ms). If you only care about the second-level precision, you can truncate with Math.floor(ms / 1000).
  • Negative values are valid and represent dates before 1 January 1970 — for example -86400000 is 31 December 1969 in UTC.
  • Always store and transmit the UTC ISO-8601 string for serialisation; use the local time representation only for display in a user’s timezone.