Features Pricing Docs Blog

Unix timestamp converter, down to the nanosecond

Paste an epoch timestamp in any unit — the unit is detected from its length — or a date, and get it back in every unit at once. Nanoseconds survive the round trip, so OpenTelemetry's timeUnixNano values convert exactly.

The current time, when this page was rendered.

ISO 8601, UTC
2026-10-18T04:37:18.740598000Z
RFC 2822
Sun, 18 Oct 2026 04:37:18 +0000
Seconds
1792298238
Milliseconds
1792298238740
Microseconds
1792298238740598
Nanoseconds
1792298238740598000
OTLP/JSON
"timeUnixNano": "1792298238740598000"
ClickHouse DateTime64(9, 'UTC')
'2026-10-18 04:37:18.740598000'

Which unit is my timestamp in?

Count the digits. A Unix timestamp for any date between 2001 and 2286 has 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. The converter uses the same rule — up to 11 digits is seconds, 12–14 milliseconds, 15–17 microseconds, anything longer nanoseconds — and you can override it with the unit picker when a value is ambiguous.

UnitDigits todayWhere you meet it
Seconds10date +%s, PHP time(), Python int(time.time()), JWT exp
Milliseconds13JavaScript Date.now(), Java System.currentTimeMillis()
Microseconds16PostgreSQL internals, Python time.time_ns() // 1000
Nanoseconds19OpenTelemetry timeUnixNano, Go UnixNano(), date +%s%N

Nanoseconds in OpenTelemetry

OTLP carries every time as fixed64 nanoseconds since the epoch — timeUnixNano on a log record, startTimeUnixNano and endTimeUnixNano on a span. In OTLP/JSON the value is written as a string, because a 19-digit integer does not fit in a JavaScript number: 1760020200123456789 parsed as a double comes back as 1760020200123456800. This converter never passes the value through a float, so the last digits survive. The field is unsigned, so dates before 1970 cannot be expressed, and the largest value a signed 64-bit integer holds is 2262-04-11.

Storing them

ClickHouse keeps nanosecond time in DateTime64(9), which is what the OpenTelemetry exporter's tables use and what Bilis stores logs, spans and metrics in. The literal on the last line above can be pasted straight into a query's WHERE.