Convert between Unix/Epoch timestamps and human-readable dates. Supports seconds and milliseconds with timezone information
Convert between Unix timestamps and human-readable dates. Enter a timestamp to see the corresponding date and time, or pick a date to get the timestamp. Supports seconds and milliseconds.
Initializing in your browser…
A log line records `1700000000` and you need the human date to correlate it with an incident timeline.
Unix timestamp (seconds)
1700000000
Human time
UTC: 2023-11-14 22:13:20 Local: 2023-11-14 23:13:20 (Europe/Berlin) Relative: ~6 months ago
A Unix timestamp counts seconds since 1970-01-01 UTC, so it is timezone-agnostic until rendered, the tool shows UTC and your local zone side by side to prevent off-by-hours mistakes when correlating logs. It also handles millisecond timestamps and converts the other way for building queries.
Convert between Unix timestamps and human-readable dates. Enter a timestamp to see the corresponding date and time, or pick a date to get the timestamp. Supports seconds and milliseconds.
The converter runs bidirectionally through a mode toggle. In Timestamp to Date mode it auto-detects the unit by digit count: any input of 13 or more characters is treated as milliseconds, anything shorter is treated as seconds and multiplied by 1000 before being passed to JavaScript's Date constructor. A manual Milliseconds checkbox overrides that heuristic when you need to. The input is filtered with /[^0-9-]/g, so it keeps digits and the minus sign but strips everything else, which means negative (pre-1970) timestamps are typeable. Each parsed timestamp renders four labeled, copy-to-clipboard rows: Local Time (toLocaleString), UTC Time (toUTCString), ISO 8601 (toISOString), and a Relative value, plus a footer showing your detected IANA timezone from Intl.DateTimeFormat().resolvedOptions().timeZone. Showing local and UTC side by side is deliberate, so a local rendering is never mistaken for UTC.
Date to Timestamp mode takes a native date picker and a time picker (step="1", so seconds are selectable) and builds the string `${dateValue}T${timeValue || '00:00:00'}`, defaulting to midnight when no time is set. That string is parsed by new Date() without a trailing Z, so it is interpreted in your local timezone rather than UTC. It outputs the Unix timestamp in both seconds (Math.floor of getTime()/1000) and milliseconds (getTime() directly), plus the ISO 8601 form, each copyable. Six quick-fill presets seed common values: Now, Start of Today, Start of Year, Unix Epoch (0), Y2K (946684800), and Max 32-bit (2147483647). That last preset is the exact 03:14:07 UTC, 19 January 2038 boundary where a signed 32-bit second counter overflows, the well-known Year 2038 problem.
A live readout at the top recomputes the current Unix timestamp every 1000ms via setInterval and is one-click copyable, and a Now button fills either field with the present moment depending on the active mode. The Relative column is computed by a local getRelativeTime helper that uses coarse calendar approximations, 30-day months and 365-day years, and emits a single largest unit such as "3 days ago" or "in 2 years". Because Unix time is just a second count from the 1970 epoch and ignores leap seconds, and the digit-count auto-detection can silently misread an out-of-range value, the dual local/UTC display and the explicit Milliseconds toggle exist to catch exactly those ambiguities. Configurations (mode, timestamp, and the milliseconds flag) are encoded in the URL via useUrlStates and shareable through the Share button.
Paste 1704067200 in Timestamp to Date mode; it is auto-detected as seconds, giving the Local Time, UTC Time, and ISO 8601 (2024-01-01T00:00:00.000Z) renderings at once.
Switch to Date to Timestamp, pick a date and time, and copy the milliseconds row (Date.getTime()) for use with JavaScript's Date constructor or a logging field.
Click the Max 32-bit preset to load 2147483647 and see it resolve to 03:14:07 UTC on 19 January 2038, the point where signed 32-bit time_t overflows.
Convert epoch timestamps from application logs into readable dates for debugging.
Generate timestamp values for SQL WHERE clauses when filtering by date ranges.
Convert between human-readable dates and the epoch format many APIs use for time fields.
The number of seconds (or milliseconds) that have elapsed since January 1, 1970, 00:00:00 UTC, also known as the Unix epoch.
Timestamps in seconds are typically 10 digits (until the year 2286). Millisecond timestamps are 13 digits.
Conversions run on your device in JavaScript. The values you enter are never sent over the network.