Unix timestamp milliseconds to date

If your epoch value has 13 digits, it is usually milliseconds. Convert it directly to date-time without dividing unless your code expects seconds.

Quick unit check
  • 10 digits → seconds (example: 1700000000)
  • 13 digits → milliseconds (example: 1700000000000)
  • Seeing year 1970 often means milliseconds were treated as seconds (or vice versa).
// JavaScript
const ms = 1700000000000;
const date = new Date(ms);

// If you only have seconds, multiply by 1000 first
const seconds = 1700000000;
const dateFromSeconds = new Date(seconds * 1000);
Convert and verify both UTC and local output using the Unix Timestamp Converter.