↑↓ to navigateEnter to openEsc to close

Time & automation

Unix Timestamp Converter

Convert Unix seconds, milliseconds, microseconds or nanoseconds to UTC, and convert ISO dates back to exact epoch units.

Unix Timestamp workspace

Auto detection is a convenience, not proof of the unit.


Date to Unix timestamp

All units

Whole seconds are floored; smaller output units retain the date’s milliseconds.

Enter one timestamp per line or convert an ISO date. Ctrl/Cmd+Enter converts.

Processed locally

Your input stays in this browser tab. This tool makes no upload or API request and does not save input history.

About this unix timestamp

Unix time counts elapsed units from 1970-01-01 00:00:00 UTC. Systems use several unit scales, so the same-looking integer can describe very different dates unless its unit is known.

This converter uses BigInt before creating a browser Date, keeping microsecond and nanosecond input exact during scaling. Date output is millisecond-based, so any smaller remainder cannot appear in the ISO string.

Unix timestamps are everywhere: server logs, APIs, databases, and system events all use epoch time for consistency. But different systems use different units—seconds, milliseconds, microseconds, even nanoseconds. Confusion between units leads to timestamps 1000x off, breaking time-sensitive logic and creating debugging nightmares. This free Unix timestamp converter eliminates unit guessing with explicit selection or automatic detection, giving you exact date-time conversions in seconds.

Beyond single conversions, this tool handles batch operations, timezone display choices, and high-precision values. Convert timestamp lists from logs, APIs, or data exports all at once. Display results in UTC (for standardization and system work) or browser local time (for user-facing displays). High-precision support uses JavaScript BigInt before date creation, preserving microsecond and nanosecond accuracy exactly as they appear in the input.

Common use cases include: debugging production logs to understand when events occurred, converting API timestamps to readable dates for reports, batch-processing monitoring data, and validating timestamp values before database imports. The reverse direction lets you convert dates back to epoch units, essential for scheduling, time-travel debugging, and building time-based APIs. Handles negative timestamps for historical dates with full POSIX support.

How to use this tool

  1. 01

    Select or detect the unit

    Explicit seconds, milliseconds, microseconds or nanoseconds is safest. Auto mode reports the unit inferred from digit count.

  2. 02

    Convert one value or a batch

    Put one whole-number timestamp on each line. Negative timestamps represent instants before the Unix epoch.

  3. 03

    Use an offset for date input

    Enter Z or a numeric timezone offset with a date-time so the conversion is unambiguous.

Worked examples

Unix epoch

Input
0 seconds
Result
1970-01-01T00:00:00.000Z

Same instant in different units

Input
1704067200 s
1704067200000 ms
1704067200000000 µs
Result
2024-01-01T00:00:00.000Z

Limits and edge cases

  • Digit-count auto detection is ambiguous for historical dates, future dates and unusually scaled values. Override it whenever the source unit is known.
  • POSIX time ignores leap seconds and models each day as 86,400 seconds.
  • JavaScript Date has millisecond precision and a finite range of ±8,640,000,000,000,000 milliseconds. Smaller fractions are floored to the containing millisecond for date display.
  • An offsetless date-time is interpreted in the browser timezone by JavaScript and can surprise users, so this page requires Z or an explicit offset.

Standards and references

Common questions

How does automatic timestamp detection work?

It uses the count of decimal digits: up to 10 for seconds, 13 for milliseconds, 16 for microseconds and longer for nanoseconds. This is only a heuristic.

Why are microseconds missing from the ISO result?

The built-in browser Date type stores milliseconds. The converter reads the original integer exactly, but ISO Date output cannot display the sub-millisecond remainder.