Unix Timestamp Converter API
Convert unix timestamps to dates and dates to epoch seconds or milliseconds online. Live clock, timezone-aware output, free and fast.
The Unix Timestamp Converter is also available as a free REST API. Send a POST request with a JSON body to https://dot.tools/api/tools/unix-timestamp — no authentication, no API key, CORS enabled. Successful calls return { "ok": true, "result": { … } }; failures return HTTP 400 or 422 with an error body.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
mode | "unix-to-date" | "date-to-unix" | required | Conversion direction: unix timestamp to date, or date to unix timestamp. |
input | string | required | For unix-to-date: a unix timestamp (integer or fractional seconds). For date-to-unix: an ISO 8601 date string. Strings without a timezone offset are interpreted as UTC. |
unit | "auto" | "s" | "ms" | required | Unit of the input timestamp for unix-to-date. "auto" treats absolute values >= 1e12 as milliseconds, otherwise seconds. Ignored for date-to-unix. |
Response
| Field | Type | Required | Description |
|---|---|---|---|
unix | unknown | required | Unix timestamp in whole seconds (fractional input is floored). |
ms | unknown | required | Unix timestamp in milliseconds. |
iso | unknown | required | ISO 8601 representation of the date in UTC. |
utc | unknown | required | Human-readable UTC string of the date. |
error | unknown | required | Error message when the input could not be converted. |
Example request
curl -X POST https://dot.tools/api/tools/unix-timestamp \
-H 'Content-Type: application/json' \
-d '{
"mode": "unix-to-date",
"input": "1750000000",
"unit": "auto"
}'Sample response
{
"ok": true,
"result": {
"unix": 1750000000,
"ms": 1750000000000,
"iso": "2025-06-15T15:06:40.000Z",
"utc": "Sun, 15 Jun 2025 15:06:40 GMT",
"error": null
}
}Use the free Unix Timestamp Converter in your browser, read the Unix Timestamp Converter guide, or import the full OpenAPI specification.