Nanoseconds Converter
Convert nanoseconds to a date, and back
The 19-digit form — Go's `UnixNano`, Prometheus, InfluxDB, OpenTelemetry — with a warning about the precision JavaScript quietly loses 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?
A JavaScript number is a 64-bit float with 53 bits of integer precision, and a nanosecond timestamp needs about 61. Anything past roughly microsecond resolution is rounded. Use BigInt or a string if the last three digits matter.
When does nanosecond time overflow?
A signed 64-bit nanosecond counter runs out in 2262. That is why Go's `time.Time` stores seconds and nanoseconds separately rather than as one integer.
Related tools
Seconds, milliseconds, microseconds and nanoseconds, in both directions.
Microseconds ConverterThe 16-digit form — PostgreSQL internals, ClickHouse, Python's `time_ns() / 1000`, and Chrome's own clock, which counts from 1601 instead.
Milliseconds ConverterThe 13-digit form — what `Date.now()`, `System.currentTimeMillis()` and most of Java and JavaScript speak — converted both ways, with the seconds value beside it.
Unix Timestamp ConverterPaste a timestamp and get the date; paste a date and get the timestamp. Seconds, milliseconds, microseconds and nanoseconds are detected from the digit count, and the guess is shown so you can override it.
Timestamp ValidatorChecks a numeric timestamp for the mistakes that actually happen: the wrong unit, a 32-bit overflow, a sentinel value, or a date nowhere near where it should be.