This converter is for when you have a numeric timestamp and you want to know what date it represents. Paste the value, select the timezone to display in and then compare the ISO UTC result against the local clock result.
Check the unit first before trusting the date
A typical unix time value is 10 digits in seconds. JavaScript epoch style milliseconds are typically 13 digits. The converter uses that difference as a practical default for ordinary values, but a field name or API contract is more reliable than a digit count.
const seconds = 1700000000;
const date = new Date(seconds * 1000);
console.log(date.toISOString());
// 2023-11-14T22:13:20.000Z
If you give JavaScript Date a 10-digit value directly, it treats it as milliseconds and ends up in January 1970. Create the Date object by multiplying the seconds by 1000.
Frequent questions:
- Q: How do I convert epoch to time?
- A: Enter the epoch value into the converter and check if it is seconds or milliseconds and choose a timezone. The result will be shown as the corresponding readable time, date, ISO 8601 value and UTC string.
- Q: How do I convert a Unix timestamp to time?
- A: A unix timestamp is an epoch value. Input your 10 digit seconds value or 13 digit milliseconds value and the converter will give you the calendar date and local time for the same instant.
- Q: How do I get a date from a Unix timestamp?
- A: Paste your timestamp into the converter at the top of this page and it will automatically detect seconds vs milliseconds and show the resulting date in UTC, ISO 8601, and any timezone you choose. In code, the one-liner is new Date(seconds * 1000) in JavaScript, datetime.fromtimestamp(seconds, tz=timezone.utc) in Python, or gmdate('c', seconds) in PHP.
- Q: How do I convert a timestamp into a date in JavaScript?
- A: new Date(1700000000 * 1000) returns a Date object — multiply seconds by 1000 first, then call .toISOString(), .toUTCString() or Intl.DateTimeFormat for formatted output. If you already have milliseconds, you can skip the multiplication.
- Q: How do I convert a timestamp into a date in Python?
- A: You can use datetime.fromtimestamp(seconds, tz=timezone.utc) for a timezone-aware UTC datetime. For local time omit the tz argument and for ISO output you can append .isoformat().
- Q: Why does my Unix timestamp turn into a 1970 date?
- A: Because you passed a 10 digit seconds timestamp to a function expecting milliseconds, which usually is new Date() JavaScript. You need to first multiply the value by 1000.
- Q: What format does the date output in?
- A: This page outputs ISO 8601 (the canonical machine-readable form), a friendly local display, the UTC string, the weekday, and the relative time. Copy whatever is in the format your code / workflow expects.
- Q: How do I convert millis to a Unix timestamp?
- A: Just divide the millisecond value by 1000 and take the floor — Math.floor(ms / 1000) in JavaScript, ms // 1000 in Python, ms / 1000L in Java. To convert from seconds to milliseconds multiply by 1000. The converter at the top accepts both 10 and 13 digit inputs.
- Q: How do I convert currentTimeMillis to a date?
- A: System.currentTimeMillis() returns epoch milliseconds. Paste directly into the converter, it auto-detects the 13-digit unit. In code form:Instant.ofEpochMilli(System.currentTimeMillis()).toString() returns an ISO 8601 string.