Nanoseconds Converter
Convert nanoseconds to a date, and back
The 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.
Questions people ask
The things that come up about nanoseconds converters, answered plainly.
Why does my nanosecond value lose its last digits?
JavaScript stores each number as a 64-bit float. That holds whole numbers exactly up to 53 bits. A nanosecond timestamp needs about 61. So anything finer than about a microsecond gets rounded. If the last three digits matter, use BigInt or a string.
When does nanosecond time overflow?
A signed 64-bit count of nanoseconds runs out in 2262. That is why Go's `time.Time` keeps seconds and nanoseconds apart, not as one big number.
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.
Milliseconds ConverterThe 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.
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 ValidatorChecks a number timestamp for the mistakes that really happen. The unit may be wrong. It may be past the 32-bit limit. It may be a stand-in value. Or the date may be far from where it should be.