Seconds, milliseconds, microseconds or nanoseconds?
A Unix timestamp for a present-day date has 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. Auto-detect uses that digit count: up to 11 digits is read as seconds, 12 to 14 as milliseconds, 15 to 17 as microseconds and 18 or more as nanoseconds. The digit ruler under the input colours each group of three digits by the unit it belongs to, so you can see where the seconds end.
The converter then checks the result. If the date is far from the present, or if another unit would also give a plausible modern date, it shows a warning and lists each alternative. One click locks the unit you meant. Short values such as 86400 are often durations rather than instants, and they are flagged the same way.
Examples to try
Where each unit comes from
Seconds: POSIX time(), PHP time(), Python int(time.time()), PostgreSQL extract(epoch …), JWT iat and exp claims. Milliseconds: JavaScript Date.now(), Java System.currentTimeMillis(), Elasticsearch and most JSON APIs. Microseconds: PostgreSQL internals, BigQuery UNIX_MICROS, Chrome trace events. Nanoseconds: Go UnixNano(), OpenTelemetry spans, Prometheus remote write, InfluxDB line protocol.
Questions
- How do I tell whether a timestamp is in seconds or milliseconds?
- Count the digits. For dates between 2001 and 2286, seconds have 10 digits and milliseconds have 13. The converter shows the count and flags readings that land far from today.
- Can a Unix timestamp have decimals?
- Yes. 1700000000.25 seconds is 250 ms after the whole second. Fractions are parsed exactly. When a value has more precision than 1 nanosecond, it is rounded with the rounding mode you choose, and the result says so.
- Does Unix time include leap seconds?
- No. POSIX time treats every day as 86,400 seconds, so 23:59:60 cannot be represented. This tool maps a real leap second to the following 00:00:00 and labels the result.