Timestamp converter

Convert Unix-style seconds or milliseconds to ISO UTC text, and local date-time input to both units.

Inputs stay in your browser

Interactive tool

Enable JavaScript to use the interactive controls. The guide below is available without JavaScript.

The timestamp converter supports two directions. Choose seconds or milliseconds explicitly for numeric input and receive an ISO 8601 UTC string; a browser local date-time input is converted to Unix seconds and milliseconds.

When to use this tool

  • Inspect an API timestamp as a readable UTC instant.
  • Create seconds and milliseconds for a selected local date and time.

How to use

  1. Enter an integer timestamp and select seconds or milliseconds, or choose a local date and time.
  2. Review the ISO UTC result or the seconds/milliseconds pair.
  3. Use the swap action to transfer a valid value between the two sections.

Example

Unix epoch sample

1704067200 seconds converts to 2024-01-01T00:00:00.000Z.

How it works

  • JavaScript Date stores milliseconds since the Unix epoch. ISO output is produced in UTC with toISOString; datetime-local input is interpreted in the browser’s local timezone.

Limits and notes

  • Fractional and out-of-range timestamps are rejected; the selected unit is never inferred from digit count.
  • A datetime-local field has no timezone suffix and therefore uses the current browser timezone shown beside the field.
  • Leap seconds are not represented by JavaScript Date.

Frequently asked questions

How are seconds and milliseconds distinguished?

You select the unit explicitly, so historic and far-future values are not guessed by digit count.

Why does the ISO result end in Z?

Z denotes UTC. The tool converts the instant to a UTC ISO string for display.

Which timezone is used for date-time input?

The browser interprets datetime-local values in its current local timezone.

References

Related tools

Send tool feedback

The message includes page context only, never tool input or results.

Send tool feedback