ToolNest logoToolNest.

How to Convert Epoch Milliseconds to Date Online

To convert epoch milliseconds to a date, divide the 13-digit timestamp by 1,000 to get Unix seconds, then convert that to a calendar date — for example, 1,728,000,000,000 ms is October 4, 2024. The fastest route is a converter that handles the math and timezone for you. Try our free Unix Timestamp Converter.

What Epoch Milliseconds Are (and Why 13 Digits)

Epoch milliseconds count the milliseconds since January 1, 1970, 00:00:00 UTC — the Unix epoch, the zero point of computer time. They are 13 digits long because there are roughly 1.7 trillion milliseconds between 1970 and today, and 1.7 trillion needs 13 digits. Their 10-digit cousins, epoch seconds, count the same span in seconds and are what most Unix systems and APIs use. Milliseconds exist because a lot of modern software needs finer resolution than one second: JavaScript's Date.now(), Java's System.currentTimeMillis(), and most event logs, IoT sensors, and analytics SDKs all stamp time in milliseconds. The practical signature: if a timestamp you are debugging is 13 digits (like 1728000000000), it is milliseconds; if it is 10 digits (like 1728000000), it is seconds. The two differ by exactly a factor of 1,000, and that factor of 1,000 is the single most common source of timestamp bugs — a story the next section tells in full. Both formats share the same epoch and the same UTC foundation; only the unit differs.

The 10-Second Method: Convert Epoch Milliseconds Online

The fastest way to convert epoch milliseconds to a date needs no code: 1. Copy the 13-digit timestamp. 2. Paste it into a converter that accepts milliseconds. 3. Read the date in your timezone — and check the UTC time too, since the same instant reads as a different local time on each side of the planet. Our Unix timestamp converter detects 13-digit input as milliseconds automatically, shows the date in both UTC and your local timezone, and also converts the other direction (date → timestamp). Two details that save debugging hours: first, confirm whether your converter expects milliseconds or seconds before pasting — pasting milliseconds into a seconds field silently produces a date tens of thousands of years in the future. Second, remember that the converter shows an instant, not a local time: 1728000000000 ms is October 4, 2024 at 00:00 UTC, which is October 3 at 5 PM in Los Angeles. When two systems disagree about a timestamp, the timezone is the culprit nine times out of ten, not the timestamp itself.

Epoch Milliseconds vs Seconds: the Mix-Up That Breaks Everything

Epoch milliseconds vs seconds is the timestamp world's most expensive confusion, and it fails in two opposite directions. Failure one: seconds fed to a milliseconds converter. Paste 1728000000 (October 4, 2024, in seconds) where milliseconds are expected and you get January 21, 1970 — because 1.728 billion milliseconds is only 20 days after the epoch. If your converted date lands in January 1970, you fed seconds to a milliseconds field; multiply by 1,000. Failure two: milliseconds fed to a seconds converter. Paste 1728000000000 where seconds are expected and you get a date in the year 56,730 — because 1.728 trillion seconds is 54,760 years. If your date is absurdly far in the future, divide by 1,000. The sniff test is instant: 10 digits = seconds, 13 digits = milliseconds. (Microseconds would be 16 digits; nanoseconds 19.) A related gotcha: some APIs return milliseconds as a string ('1728000000000') and some as a number — JavaScript handles both in new Date(), but strict JSON schemas and databases may not. When a timestamp looks right but a system rejects it, check the type before the value. For the seconds side of the family, our Unix timestamp to date in Excel guide covers the 10-digit workflow cell by cell.

How to Convert Epoch Milliseconds in JavaScript

How to convert epoch milliseconds in JavaScript? JavaScript is the native habitat of the 13-digit timestamp — Date works in milliseconds everywhere, so the conversion is one constructor call: new Date(1728000000000). That gives you a Date object for October 4, 2024. To display it, .toISOString() returns '2024-10-04T00:00:00.000Z' (always UTC — best for logs and APIs), while .toLocaleString() renders it in the viewer's timezone (best for user interfaces). Going the other direction: Date.now() returns the current time in milliseconds — run it in any browser console and you will get a 13-digit number — and new Date('2024-10-04').getTime() returns 1728000000000. Two JavaScript-specific traps. First, new Date() with a seconds timestamp (10 digits) silently gives you January 1970 — multiply seconds by 1,000 first: new Date(1728000000 * 1000). Second, Date.parse() on date strings interprets missing timezones as local time, not UTC — '2024-10-04' parses to midnight in the browser's timezone, which is a different instant than the UTC midnight the timestamp represents. For date-only work, append 'T00:00:00Z' to pin it to UTC.

Convert Epoch Milliseconds in Excel

To convert epoch milliseconds in Excel, the formula is =A1/86400000+DATE(1970,1,1) — then format the cell as a date. Here is why it works: Excel stores dates as serial numbers counting from January 1, 1900, and there are 86,400,000 milliseconds in a day (24 × 60 × 60 × 1,000). Dividing the timestamp by 86,400,000 turns it into a fraction of a day since the epoch; adding DATE(1970,1,1) — Excel serial 25569 — re-bases it onto Excel's calendar. With 1728000000000 in A1, the formula returns October 4, 2024 (once formatted as a date; unformatted it shows 45577, the serial number). The seconds variant is =A1/86400+DATE(1970,1,1) — 86,400 seconds per day. Common failures: forgetting the /1000 step and treating milliseconds as seconds (dates land in 1970), or formatting the result as General instead of Date (you see a five-digit serial and assume the formula broke). Google Sheets uses the identical formula. For the full 10-digit walkthrough with timezone handling, see our convert Unix timestamp to date in Excel guide.

Epoch Milliseconds in Python

Python's datetime module converts epoch milliseconds in two steps: divide by 1,000, then call fromtimestamp. The pattern: from datetime import datetime, timezone, then datetime.fromtimestamp(1728000000000/1000, tz=timezone.utc) → 2024-10-04 00:00:00+00:00. Always pass tz=timezone.utc: without it, fromtimestamp uses your machine's local timezone, which makes the same code print different dates on servers in different regions — the classic 'works on my machine' timestamp bug. The reverse direction: int(datetime(2024, 10, 4, tzinfo=timezone.utc).timestamp() * 1000) gives 1728000000000. For pandas work, pd.to_datetime(df['ts'], unit='ms', utc=True) converts a whole column at once — note the unit='ms' parameter, which exists precisely because pandas defaults to nanoseconds and would otherwise misread your data by a factor of a million. One more precision note: Python floats carry about 15–16 significant digits, and a 13-digit millisecond timestamp plus fractional math fits comfortably — but if you need exact arithmetic on huge timestamp batches, keep the values as integers and divide only at the final step.

Where 13-Digit Timestamps Come From

Thirteen-digit timestamps show up anywhere software measures time more precisely than a second. JavaScript and the browser: Date.now(), performance timings, and every getTime() call — if you copied the number from a console or a web API, it is almost certainly milliseconds. Java and Android: System.currentTimeMillis(), the backbone of Android event logging. Databases: MongoDB stores datetimes as 64-bit millisecond counts, so exported documents carry 13-digit values. Event pipelines: Kafka, analytics SDKs, and IoT sensors stamp in milliseconds because ordering events within the same second matters. Unix command line: date +%s%3N prints milliseconds (the %3N is the millisecond part). One format to contrast: JWT tokens carry their expiry (exp), issued-at (iat), and not-before (nbf) claims in seconds, not milliseconds — decoding a JWT and treating exp as milliseconds is a real bug people ship. Our guide to reading a JWT token shows how to decode those claims by hand. When you meet a mystery timestamp in the wild, count the digits first: 10 means seconds, 13 means milliseconds, and everything else means you should check the documentation.

Quick Reference: Epoch Millisecond Cheat Sheet

Everything in one place. Definition: milliseconds since 1970-01-01T00:00:00Z. Digit test: 10 digits = seconds, 13 digits = milliseconds. Convert ms → seconds: divide by 1,000. Anchor: 1,728,000,000,000 ms = October 4, 2024, 00:00 UTC. Milliseconds per day: 86,400,000. JavaScript: new Date(1728000000000); now: Date.now(). Excel: =A1/86400000+DATE(1970,1,1), format as date. Python: datetime.fromtimestamp(ms/1000, tz=timezone.utc). Failure signatures: January 1970 = fed seconds as ms (×1000 to fix); year 56,000+ = fed ms as seconds (÷1000 to fix). Timezone rule: the timestamp is an instant; the displayed date depends on the viewer's zone — always check UTC when systems disagree. Convert any 10- or 13-digit timestamp instantly with our Unix timestamp converter, and find every other converter and calculator on the ToolNest homepage — 130+ free tools, no signup, everything running in your browser.

Do it in one click

Convert 13-digit timestamps to readable dates instantly — free, no signup.

Open the Free Tool →