Unix Timestamp Converter

Convert a Unix timestamp (seconds or milliseconds) to a human-readable UTC and local date and time, with relative time.

Inputs

Seconds or milliseconds since Jan 1 1970 UTC.

How to interpret the number; auto-detect uses digit count.

Your timezone offset from UTC (e.g. -5 for EST, +1 for CET). 0 = UTC.

Result

Loading calculator…

How to use this calculator

  • Paste the Unix timestamp.
  • Leave unit on auto-detect, or set seconds/milliseconds explicitly.
  • Enter your UTC offset for a local-time display (0 for UTC).
  • Read the ISO, UTC, and local date-time plus both epoch representations.

About this calculator

Unix time (or epoch time) is the number of seconds that have elapsed since midnight UTC on January 1, 1970, and it is how computers almost universally store moments in time. This converter turns a Unix timestamp into a readable date and time. It auto-detects whether your number is in seconds (10 digits for current dates) or milliseconds (13 digits, as JavaScript uses), or you can set the unit explicitly. It shows the result in ISO 8601 format, a full UTC string, and your local time using a UTC offset you provide, plus both the seconds and milliseconds representations for convenience. Unix timestamps are timezone-agnostic — they always refer to the same instant in UTC — which is why the local display requires you to specify your offset. This is handy for debugging logs, API responses, and database records that store epoch times.

How it works — the formula

ms = seconds × 1000 Date = 1970-01-01T00:00:00Z + ms Local = UTC + offset hours

The epoch plus the elapsed milliseconds gives the UTC instant; adding a fixed offset yields local time.

Worked examples

Example 1
1700000000 (seconds)
Inputs:
timestamp=1700000000, unit=auto
Output:
2023-11-14T22:13:20Z
Example 2
1700000000000 (ms)
Inputs:
timestamp=1700000000000, unit=auto
Output:
same instant, detected as ms
Example 3
0
Inputs:
timestamp=0
Output:
1970-01-01T00:00:00Z (the epoch)

Limitations

  • Local time uses a fixed offset; no automatic DST handling.
  • Auto-detect threshold is 1e12 (≈ year 33658 in seconds).
  • Bound by JavaScript’s Date range (±~273,790 years).

Conversions are exact UTC; local display depends on the offset you provide.

Frequently asked

What is a Unix timestamp?+
It is the number of seconds since the Unix epoch — 00:00:00 UTC on January 1, 1970. It is a simple, timezone-independent way to represent an instant in time, used throughout computing for logs, databases, and APIs.
How do I tell if a timestamp is in seconds or milliseconds?+
By its length. A current-era timestamp in seconds has 10 digits (e.g. 1700000000), while milliseconds has 13 (e.g. 1700000000000). This tool auto-detects based on magnitude, treating numbers ≥ 1e12 as milliseconds.
Why does the local time need a UTC offset?+
Because a Unix timestamp itself carries no timezone — it always denotes a UTC instant. To show it in your local time, the tool adds your offset (e.g. −5 hours for US Eastern Standard Time). It does not auto-apply daylight saving.
What is the year-2038 problem?+
Systems storing Unix time in a signed 32-bit integer overflow on January 19, 2038, when the second count exceeds 2,147,483,647. Modern systems use 64-bit timestamps, which avoid the issue for billions of years.
What is ISO 8601?+
A standard date-time format like 2023-11-14T22:13:20.000Z, where the trailing Z means UTC. It is unambiguous and sorts chronologically as text, which is why it is preferred for storing and exchanging dates.
Can timestamps be negative?+
Yes. Negative Unix timestamps represent dates before 1970 — for example, −1 is one second before the epoch (1969-12-31T23:59:59Z). This converter handles negative values within JavaScript’s date range.

Related calculators

More tools you might like

Hand-picked tools that pair well with this one — same audience, same intent.