JavaScript
Date.now() returns milliseconds. Divide by 1,000 and round down for whole seconds.
Seconds
Math.floor(Date.now() / 1000)Milliseconds
Date.now()Tools
Copy the current Unix timestamp or convert between seconds, milliseconds and dates in your selected timezone.
Updates in your browser. Pause the clock if you need a stable value.
Unix seconds
—
Unix milliseconds
—
Current offset: UTC+00:00
Convert Unix seconds or milliseconds into readable dates.
Interpret a date and time in the selected timezone.
Selected timezone: UTC (UTC+00:00)
Conversions stay in this browser. Your timestamps and dates are not uploaded.
A Unix timestamp counts the seconds elapsed since 1 January 1970 at 00:00:00 UTC. The same timestamp represents one instant worldwide; only its displayed date and time change by timezone. This converter accepts Unix seconds or milliseconds and converts a date in the selected timezone back to both units.
The number of digits usually identifies the unit used by current application data.
| Digits | Unit | Example | Typical use |
|---|---|---|---|
| 10 | Seconds | 1704067200 | APIs, server logs and database records |
| 13 | Milliseconds | 1704067200000 | JavaScript and systems that need sub-second precision |
This page handles seconds and milliseconds. It does not currently parse 16-digit microseconds or 19-digit nanoseconds.
A Unix timestamp does not contain a timezone. It identifies a single point in time relative to the Unix epoch in UTC.
When converting a timestamp, this page shows the time in your selected timezone and an ISO 8601 UTC value. A date entered in the date field is interpreted in the selected timezone, so check the timezone and UTC offset before copying the result.
The tool keeps the machine value and the readable date together so you can check API, log and database values.
These examples return whole seconds or milliseconds from the same UTC-based Unix epoch.
Date.now() returns milliseconds. Divide by 1,000 and round down for whole seconds.
Seconds
Math.floor(Date.now() / 1000)Milliseconds
Date.now()time.time_ns() returns an integer count from the Unix epoch, avoiding floating-point conversion.
Seconds
import time
time.time_ns() // 1_000_000_000Milliseconds
import time
time.time_ns() // 1_000_000EXTRACT(EPOCH) returns seconds from the UTC epoch. clock_timestamp() reads the actual current time.
Seconds
SELECT floor(EXTRACT(EPOCH FROM clock_timestamp()))::bigint;Milliseconds
SELECT floor(EXTRACT(EPOCH FROM clock_timestamp()) * 1000)::bigint;The built-in date command returns seconds. Use Python 3 when you need a millisecond value across macOS versions.
Seconds
date +%sMilliseconds
python3 -c 'import time; print(time.time_ns() // 1_000_000)'Unix timestamps are based on UTC, so these numeric values do not change with the computer or database timezone. A timezone matters only when you format the value as a readable date and time.
A Unix timestamp is the number of seconds elapsed since 1 January 1970 at 00:00:00 UTC. Millisecond timestamps use the same starting point but count milliseconds instead.
Automatic detection recognises only 10-digit seconds and 13-digit milliseconds, including negative values with those digit counts. For any other length, choose seconds or milliseconds before converting.
No. A Unix timestamp represents one point in time and does not store a timezone. Timezones only affect how that point is displayed as a date and time.
The devices or tools may use different selected timezones. The underlying timestamp is unchanged, while the readable date and time reflect the chosen timezone.
The date field is interpreted in the timezone selected above the converter. Choose the browser timezone, UTC, Hong Kong or Shanghai, then verify the displayed UTC offset before copying.
The converter rejects a local date and time that cannot exist in the selected timezone, rather than silently changing it.
The converter does not offer a separate choice for repeated local times. Verify the result against the source system, or use an explicit UTC time where that distinction matters.
No. The conversion runs in your browser. The timestamp and date entered in this tool are not sent for server-side conversion.
Continue checking the API payload, token, schedule or encoded value associated with your timestamp.