Home / Converters

Unix Timestamp Converter

Runs locally in your browser. Your input is not uploaded.

Current Unix time (seconds)

 

Milliseconds

 

A Unix timestamp converter translates machine-friendly epoch values into readable dates and back again. Use it to inspect log entries, API fields, database records, and scheduled events. The same timestamp represents one instant, while its displayed clock time changes with the selected or local time zone.

How to Use the Unix Timestamp Converter

Convert in either direction while keeping units and time zones visible.

  1. Read the live current Unix time in seconds and milliseconds.
  2. Choose a time zone from the Time zone select, or use the “Use my time zone” and UTC buttons; the choice is remembered on this device.
  3. Enter a value under Timestamp → date; seconds and milliseconds are detected automatically.
  4. Review the result in the selected zone with its UTC offset, as ISO 8601 with that offset, in UTC, and as relative time such as “3 hours ago.”
  5. Under Date → timestamp, pick a date and time; it is read as wall-clock time in the selected zone.
  6. Read the resulting Unix values in seconds and milliseconds.

What Unix Time Measures

Unix time counts elapsed time from the Unix epoch, defined as 1970-01-01 at 00:00:00 UTC. A common timestamp such as 0 refers to that instant, while a negative value represents an earlier instant. Many APIs, logs, and databases use this numeric form because it avoids carrying a locale-specific display string through every system.

Unix timestamps are instants, not formatted dates. Software applies a time zone when presenting calendar fields, so two people can see different local clock values for the same number without disagreeing about when the event occurred.

Unix time conventionally ignores leap seconds. It treats days as 86,400 nominal seconds, so it is not a direct representation of every adjustment made to civil time or Earth rotation. That behavior is practical for ordinary application timestamps, but specialized scientific or astronomical work may need a time scale and library designed for those requirements.

Seconds, Milliseconds, and JavaScript Dates

Unix timestamps commonly appear in either seconds or milliseconds. A current seconds value has about ten decimal digits, while a current milliseconds value has about thirteen. JavaScript’s Date.now() returns milliseconds since the epoch, whereas many Unix tools and token formats use seconds. Confusing the units can move a date thousands of years away from the intended result or close to January 1970.

This converter auto-detects the likely unit by magnitude, but magnitude is not a universal schema: small millisecond values near the epoch can resemble seconds. In an API, use the documented unit instead of relying only on inference. Convert by multiplying seconds by 1,000 or dividing milliseconds by 1,000 with an explicit rounding policy.

Fractional seconds may appear as a decimal seconds value. Some systems preserve microseconds or nanoseconds, which JavaScript Date cannot represent with the same precision. Avoid passing large high-precision integers through JavaScript numbers without checking the safe integer range and the destination’s supported resolution.

UTC, Local Time, ISO 8601, and Relative Dates

UTC provides a stable reference for an instant, while local time applies the browser device’s time-zone rules. Those rules include historical offsets and daylight saving transitions where applicable. If the device zone or clock is wrong, the local display can be misleading even though the timestamp-to-UTC conversion is correct.

ISO 8601 is a family of date and time representations. JavaScript commonly emits a UTC form such as 2026-11-15T12:30:00.000Z, where Z identifies UTC. An offset such as +01:00 also identifies an instant when attached to a complete date and time. A date-time without an offset is ambiguous unless the surrounding contract defines a zone.

Relative output such as “3 hours ago” depends on the browser clock and is for human orientation, not durable storage. Store the timestamp or an unambiguous ISO value and calculate relative labels for display. The text diff checker can expose formatting changes, but date validation still belongs in application logic.

Date Limits, the Year 2038 Problem, and Edge Cases

The Year 2038 problem affects systems that store Unix seconds in a signed 32-bit integer. The maximum value, 2,147,483,647, corresponds to 2038-01-19 at 03:14:07 UTC. Adding one can overflow into a negative value on affected implementations. Modern systems often use wider integer types, but legacy databases, file formats, embedded devices, and external integrations may retain the limitation.

JavaScript dates use a floating-point number of milliseconds and avoid the specific signed 32-bit cutoff. Other APIs and storage layers can impose different limits, so confirm column types and supported ranges at system boundaries.

Date-time picker input is interpreted as wall-clock time in the selected time zone. During a daylight saving transition, a wall-clock time may not exist or may occur twice. This tool flags a time that falls in a spring-forward gap and shows the next valid instant; for a repeated hour, it picks one of the two possible instants, so state an explicit offset when the distinction matters. Leap years, negative timestamps, invalid dates, fractional values, and precision loss also deserve tests. For schedules, use the cron expression builder and verify the target scheduler’s own time-zone behavior.

Frequently Asked Questions

Is a Unix timestamp always in UTC?

A Unix timestamp identifies elapsed time from the UTC epoch and does not contain a local time zone. Calling it “in UTC” is a useful shorthand, but the number itself is an instant rather than a clock display. Software converts that instant into UTC or a local zone when it presents a readable date.

How can I tell whether a timestamp uses seconds or milliseconds?

Contemporary Unix seconds usually contain about ten digits, while milliseconds usually contain about thirteen. This converter uses magnitude to auto-detect them. For application code, consult the field’s schema because dates near the epoch and values in other units can defeat a digit-count heuristic. JavaScript Date.now() specifically returns milliseconds.

Why does the converted local time differ from another device?

Each device applies its configured time zone, daylight saving database, and clock settings. The same timestamp can therefore show different local clock times while still representing the same instant. Compare the UTC or ISO output first. If those differ too, check whether one system interpreted seconds as milliseconds or used an incorrect source value.

What is the Year 2038 problem?

Systems using a signed 32-bit integer for Unix seconds reach their largest positive value on January 19, 2038. The next second can overflow and produce an invalid or much earlier date. Wider timestamp storage avoids that specific limit, but compatibility depends on every database, protocol, library, and device in the data path.

References: ECMAScript specification: Time Values and Time Range · MDN: Date.now() · RFC 3339: Date and Time on the Internet.