Epoch milliseconds converter
A timestamp in your logs or database is often a bare number like 1700000000000. That’s epoch milliseconds — the count of milliseconds since 1 January 1970 UTC, the format JavaScript’s Date.now() returns. This converter turns that number into a readable date and back again, both directions, with copy buttons for each format.
How it works
The tool uses the browser’s native Date object — no rounding tricks or external libraries. In Epoch ms to date mode it constructs a date from your millisecond value and renders it as an ISO 8601 string, a UTC time and your local time. In Date to epoch ms mode it parses any date the browser understands and reports getTime() (milliseconds) plus that value divided by 1000 (the classic Unix seconds). A 13-digit input is milliseconds; a 10-digit input is seconds.
Example
Paste 1700000000000:
| Output | Value |
|---|---|
| ISO 8601 (UTC) | 2023-11-14T22:13:20.000Z |
| Epoch seconds | 1700000000 |
| Epoch milliseconds | 1700000000000 |
Switch direction and type 2023-11-14T22:13:20Z to get 1700000000000 back. Every output has a copy button, so you can grab exactly the format your code or database expects. The conversion runs entirely on your device.
Epoch ms versus epoch seconds: when each appears
Epoch seconds (a 10-digit number) is the classic Unix timestamp, used by Unix file mtimes, POSIX system calls, most SQL TIMESTAMP columns, Python’s time.time(), and many C and Go APIs. Divide epoch milliseconds by 1000 to get epoch seconds.
Epoch milliseconds (a 13-digit number) is what JavaScript uses natively — Date.now(), new Date().getTime(), and most Node.js timer APIs return this. Browser performance APIs and many REST API responses in JSON also default to milliseconds.
Epoch microseconds (a 16-digit number) and nanoseconds (19 digits) appear in high-precision systems — database write-ahead logs, distributed tracing, kernel timestamps. They are rarer in application code but recognisable by digit count.
Spotting the format from digit count
| Digit count | Likely format | Approximate era |
|---|---|---|
| 10 | Epoch seconds | 2001 – 2286 |
| 13 | Epoch milliseconds | 2001 – 2286 |
| 16 | Epoch microseconds | 2001 – 2286 |
| 19 | Epoch nanoseconds | 2001 – 2286 |
A 10-digit number starting with 1 is almost certainly a Unix timestamp in the 2001–2033 window. A 13-digit number starting with 1 is the same moment expressed in milliseconds. If you see an 11 or 12-digit number you likely have a truncated timestamp or an unusual encoding — paste it here to see what date it decodes to and sanity-check the result.
Common debugging use cases
Log correlation: server logs and browser devtools both emit epoch timestamps, but servers often log in seconds while JS clients log in milliseconds. Paste both here to confirm they represent the same moment.
Token expiry debugging: JWT exp and iat claims use epoch seconds. Convert them to readable dates to verify a token has not expired or been issued in the future.
Database timestamp inspection: PostgreSQL EXTRACT(EPOCH FROM now()) returns seconds as a float; MongoDB ObjectIDs embed epoch seconds in the first 4 bytes. Convert to human-readable form to verify data consistency.