Convert Unix timestamps to dates
ToolMint's free Unix Timestamp Converter turns seconds or milliseconds since the Unix epoch into an ISO 8601 UTC string, a UTC display and a device-local display. It also converts a date and time entered in your device timezone back into a timestamp. Use it to inspect log times, API fields and stored event dates. No account is required; conversion runs in the browser.
Unix timestamp zero identifies 1970-01-01T00:00:00Z. Negative values identify earlier instants. A timestamp identifies an instant; the timezone affects how that instant is displayed as a calendar date and clock time. Confirm the unit supplied by your API or data source before converting.
Inputs, outputs and limits
| Direction | Accepted input | Result |
|---|---|---|
| Unix to human, seconds | Decimal digits, optional minus sign, up to three decimal places | ISO UTC, UTC text, device-local text and a relative estimate |
| Unix to human, milliseconds | Decimal integer with an optional minus sign | The same date displays, at millisecond precision |
| Human to Unix | Local calendar date and time, years 0001–9999, optional seconds and up to three fractional digits | Timestamp in the selected unit, ISO UTC and UTC text |
The timestamp field accepts at most 64 characters, including surrounding whitespace. Leading and trailing whitespace are trimmed; separators inside a number are rejected. Do not enter commas, hexadecimal, exponent notation, a plus sign, incomplete decimals or units such as ms in the field. Millisecond input must be an integer. The tool does not round additional fractional digits.
Timestamp input supports JavaScript Date's inclusive range of ±8,640,000,000,000,000 milliseconds, equivalent to ±8,640,000,000,000 seconds. Dates beyond the four-digit year range can appear in timestamp output with an expanded ISO year, but the local calendar field is restricted to years 0001–9999. These are separate input limits.
How to use the converter
- Select Seconds or Milliseconds according to your source data.
- Enter a timestamp in Unix → Human, then review ISO UTC and device-local output. Invalid input shows an error and clears that direction's results.
- Alternatively, enter Local date & time in Human → Unix. Check the displayed device timezone before interpreting the result.
- Copy the timestamp-to-date summary or the date-to-timestamp value. Each panel has its own Reset button.
Use current fills both inputs from the same device-clock reading and preserves milliseconds. It is a convenience sample, not a clock-synchronization service. The live clock and relative estimate update while the component is mounted; a background browser tab may throttle updates.
Changing the unit leaves the timestamp digits unchanged and reinterprets them in the new unit. It does not multiply or divide the input automatically. The local calendar value stays unchanged, and its timestamp output is expressed in the newly selected unit. Watch for a validation error when switching fractional seconds to integer milliseconds.
Seconds versus milliseconds
Multiply a seconds value by 1,000 to obtain milliseconds; divide milliseconds by 1,000 to obtain seconds. When the millisecond value is not divisible by 1,000, the seconds representation contains a fraction. For example, 1700000000123 milliseconds becomes 1700000000.123 seconds without discarding precision.
Digit count alone cannot establish the unit. Short values near the epoch, negative values and dates far from the present break rules based on ten versus thirteen digits. Select the documented unit rather than guessing from length.
| Input | Selected unit | ISO UTC result |
|---|---|---|
0 |
Seconds | 1970-01-01T00:00:00.000Z |
-1 |
Seconds | 1969-12-31T23:59:59.000Z |
-0.001 |
Seconds | 1969-12-31T23:59:59.999Z |
1700000000 |
Seconds | 2023-11-14T22:13:20.000Z |
1700000000123 |
Milliseconds | 2023-11-14T22:13:20.123Z |
1700000000 |
Milliseconds | 1970-01-20T16:13:20.000Z |
These examples demonstrate conversion behavior; they do not infer the meaning of an unlabeled field.
UTC and the device timezone
ISO output ends in Z, indicating UTC. The device-local display uses the browser environment's timezone rules. The local calendar field has no offset selector and is not an ISO string parser: do not paste a Z suffix or +04:00 offset into it.
For the same instant, 2023-11-14T22:13:20Z in UTC is 2023-11-15T02:13:20 in Asia/Dubai. Entering that local time in a browser configured for Dubai produces 1700000000 seconds. Entering it in a browser configured for another timezone may produce a different instant.
Timezone jumps create two important cases. The tool rejects a local time that does not exist, instead of silently shifting it. When a local time occurs twice, JavaScript chooses the earlier instant. For an exact known instant during a repeated hour, use its timestamp in the other direction and compare the resulting offset. The tool does not offer arbitrary timezone selection or a choice between repeated occurrences.
A Unix timestamp describes one instant, while a cron expression describes a recurring schedule. For repeated jobs, use the Cron Expression Generator to build a five-field Unix schedule and preview matching times in local time or UTC. Neither tool installs or runs jobs. Check the timezone and supported syntax in the scheduler that will execute the job.
JavaScript conversion examples
// Known milliseconds to an ISO UTC string.
const milliseconds = 1700000000123
const date = new Date(milliseconds)
if (Number.isFinite(date.getTime())) {
console.log(date.toISOString()) // 2023-11-14T22:13:20.123Z
}
// An explicit UTC date to Unix milliseconds.
const unixMilliseconds = new Date('2023-11-14T22:13:20.123Z').getTime()
// Whole Unix seconds, when your application requires them.
const wholeSeconds = Math.floor(unixMilliseconds / 1000)
The last expression discards fractional seconds by flooring. ToolMint retains up to three decimal places instead, including for negative instants. Use your application's required convention; do not assume truncation, flooring and preserving fractions are interchangeable.
Precision, leap seconds and the 2038 boundary
JavaScript Date represents integer milliseconds and does not model leap seconds. This converter is not for microseconds, nanoseconds, atomic time or elapsed-time benchmarking. Device clocks can be adjusted, so the live counter should not be treated as a monotonic timer.
The largest signed 32-bit integer is 2,147,483,647. Interpreted as Unix seconds, it is 2038-01-19T03:14:07Z; the following second requires a value beyond that integer range. The converter can display both values because its Date range is larger. That does not prove that a database, operating system, API or downstream client supports them. Check the actual storage type and library limits rather than assuming every modern system is unaffected.
Relative output is an approximate, rounded description. Its month means 30 days and its year 365 days. Use the ISO result for an exact instant; do not use the relative label to calculate calendar deadlines.
Privacy, copying and related tools
The tool keeps both inputs in the current component's memory. It does not upload them, fetch pasted destinations or save them to local storage. Each Reset clears its own input; refreshing or closing the page clears both. The interactive region is masked for Clarity, and conversion analytics do not include entered timestamps or dates. Copy places the selected output on your clipboard; Share uses the tool-page link rather than the entered values.
Use JSON Formatter to inspect timestamp fields in a JSON payload, URL Query Parser to examine timestamps carried in ordered URL parameters, or Text Diff Checker to compare text exports. These tools solve different tasks; they do not choose a timestamp unit or timezone for you. Find more everyday tools in the Utilities collection.
Sources
References checked October 8, 2026:
- ECMAScript: Time Values and Time Range, for the Date model and range.
- MDN: Date, for UTC/local interpretation and timezone-transition behavior.
- MDN: Date.prototype.toISOString(), for UTC output and invalid-date errors.