Unix Time Precision Converter
Time
Different systems use different Unix timestamp precisions: PostgreSQL `now()` is microseconds, `Date.now()` in JS is milliseconds, Go `time.Unix()` takes seconds, gRPC `Timestamp` is seconds+nanos, Prometheus is float seconds, syslog is nanoseconds. When you copy a number from a log line and don't know the unit, this tool auto-detects (based on magnitude — billions = s, trillions = ms, etc.) and shows all four precisions plus human-readable formats: ISO 8601, RFC 2822 (UTC), local time, and 'X seconds ago / from now'. You can override the auto-detection if you know the source unit.
- seconds (s)1781064267
- milliseconds (ms)1781064267000
- microseconds (µs)1781064267000000
- nanoseconds (ns)1781064267000000000
- UTC2026-06-10 04:04:27.000 UTC
- ISO 86012026-06-10T04:04:27.000Z
- RFC 2822Wed, 10 Jun 2026 04:04:27 GMT
- LocalWed Jun 10 2026 04:04:27 GMT+0000 (Coordinated Universal Time)
- Relative14s ago
Auto-detect uses magnitude (~10^9 = s, ~10^12 = ms, etc.). Override if your timestamp is far past/future.
How to use
- Paste a number — commas, underscores, and whitespace are stripped.
- Auto-detection picks s/ms/us/ns by magnitude. Override with the dropdown if it's wrong.
- All four precisions and four datetime formats display side-by-side. Copy whichever your destination expects.
Frequently asked questions
- How does auto-detection work?
- Modern timestamps fall in predictable magnitude ranges: a unix-seconds value for 2026 is around 1.78×10^9, ms is 1.78×10^12, us is 1.78×10^15, ns is 1.78×10^18. We pick the precision whose decade range your number falls into. Override if the value is unusual (e.g. a future date 100 years out).
- Why might microsecond/nanosecond outputs lose precision?
- JavaScript Number is a 64-bit float with 53 bits of mantissa — enough for ms precision over Date's full range, but ns values past 2^53 lose precision in the lower digits. For exact nanosecond math at large values, use a library like BigInt or display only the relevant digits.
- What's the relative time based on?
- Your browser's current time at page render. Refresh to update. Useful for sanity-checking whether a log timestamp is recent or old.
Related tools
World Clock
See several time zones side by side with live updates and offset differences from your local time.
Time Difference Calculator
Calculate the exact difference between two date-times, broken down into days, hours, minutes, and seconds.
Timezone Converter
Convert a date and time between any two world timezones, including DST.
Unix Timestamp Converter
Convert Unix timestamps to dates and dates back to timestamps.
Stopwatch & Timer
A precise stopwatch with laps and a countdown timer with an alarm.
D-Day Calculator
Count the days between two dates, or the countdown to a target date.