EpochLab

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.

All 160 tools · More in unix time & epochs