Milliseconds Converter
Convert milliseconds to a date, and back
The 13-digit form. It is what `Date.now()` and `System.currentTimeMillis()` return, and what most Java and JavaScript code uses. Convert it either way, with the seconds value shown beside it.
Questions people ask
The things that come up about milliseconds converters, answered plainly.
How do I convert milliseconds to seconds?
Divide by 1000 and round down. Do not round to the nearest, or a timestamp can land one second in the future. The page shows both values, so you can copy the one you need.
Why does JavaScript use milliseconds?
Because its `Date` was based on Java's, and Java chose milliseconds in 1995. So if you pass a JavaScript timestamp to a Unix API without dividing by 1000, you get a date near the year 45,000.
Related tools
Seconds, milliseconds, microseconds and nanoseconds, in both directions.
Microseconds ConverterThe 16-digit form. PostgreSQL uses it inside, and so does ClickHouse. In Python you get it from `time_ns() / 1000`. Chrome's own clock uses it too, but counts from 1601.
Unix Timestamp ConverterPaste a timestamp and get the date; paste a date and get the timestamp. The precision is detected from the digit count and shown so you can override it, and a number that is not Unix time is checked against the other eleven epochs too.
Timestamp to DateOne field, one answer — the timestamp as a date and time in your zone, in UTC, and in about thirty other encodings you might need to paste somewhere.
Nanoseconds ConverterThe 19-digit form, used by Go's `UnixNano`, Prometheus, InfluxDB and OpenTelemetry. You also get a warning about the digits JavaScript can drop on the way.