Skip to main content
Yoryantra
← Back to Tools

Unix Timestamp Generator

Generate Unix seconds or milliseconds from dates and convert explicit epoch units back to readable time.

Choose a conversion direction

Choose the calendar date and enter 24-hour time. Seconds and milliseconds are optional; the date and time carry no timezone or UTC offset.

Conversion Result

The generated timestamp or converted date will appear here.
Date and timestamp conversion happens entirely in the browser. No date values are uploaded for processing.

One instant, several representations

Unix time represents an instant relative to 1970-01-01 00:00:00 UTC. JavaScript Date stores time as milliseconds relative to that epoch, while many APIs and databases use whole or fractional seconds. UTC, ISO 8601, and local calendar text are different representations of the same underlying instant.

The generator keeps seconds and milliseconds explicit rather than guessing from digit count. A ten-digit value is often seconds today, but length-based heuristics break for historical dates, far-future values, negative timestamps, and test data.

Local wall-clock input has a timezone boundary

A wall-clock date-time value carries no timezone. Browser Local Time uses the machine's current timezone rules. During daylight saving transitions, some wall times do not exist and some occur twice; JavaScript chooses an offset for ambiguous repeated times. Use UTC when the intended instant is defined in UTC.

Negative timestamps are valid

Values below zero represent instants before the Unix epoch. They are useful for historical dates and test cases, although an external API or database may impose a narrower range than JavaScript Date.

Milliseconds, fractional seconds, and precision

JavaScript Date works at millisecond precision. Second input accepts up to three decimal places so values such as 1716806400.125map exactly to milliseconds. Extra sub-millisecond precision is not accepted because Date would not preserve it.

Leap seconds and POSIX-style time

JavaScript timestamps follow the conventional Unix/POSIX-style model used by web applications and do not represent leap seconds as distinct timestamp values. A timestamp should therefore not be treated as an astronomical elapsed-second counter across leap-second insertions.

References for the time model

MDN documents JavaScript Date as milliseconds since the ECMAScript epoch and explains its range and local/UTC methods. POSIX defines Epoch-related system time conventions used by Unix-like systems.