API reference
Free timestamp conversion API
One simple, stateless endpoint. No API key, no authentication, no rate limits — just paste a URL. Test it live, or grab code for your language in the timestamp code snippets.
Try it live
GET /api/convertExample: 1754136000000 — then press Fetch Result to call the live endpoint.
{ "status": "Press Fetch to call the endpoint" } Endpoint
GET https://epochtools.dev/api/convert?timestamp=1754136000000&format=json Query parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| timestamp | yes | string | The epoch timestamp to convert. Accepts seconds (10-digit), milliseconds (13-digit), microseconds (16-digit) or nanoseconds (19-digit) — the unit is auto-detected. Alias: ts |
| format | no | string | Response shape. One of json (default), iso, unix, seconds, text. |
| timezone | no | string | IANA timezone for the "local" fields. Defaults to UTC. Example: America/New_York |
| unit | no | string | Force a unit instead of auto-detecting. One of seconds, milliseconds, microseconds, nanoseconds. |
Formats
| Format | Description |
|---|---|
| json | Full JSON object with all representations (default). |
| iso | Just the ISO 8601 UTC string, plain text. |
| unix | Just the epoch seconds, plain text. |
| text | A single human-readable line combining UTC, local and relative time. |
Example — cURL
bash
curl "https://epochtools.dev/api/convert?timestamp=1754136000000" With a timezone:
curl "https://epochtools.dev/api/convert?timestamp=1754136000000&timezone=America/New_York" Example response
application/json
{
"success": true,
"input": "1754136000000",
"unit": "milliseconds",
"unit_label": "milliseconds",
"seconds": 1754136000,
"milliseconds": 1754136000000,
"iso8601_utc": "2025-08-02T12:00:00.000Z",
"rfc2822": "Sat, 02 Aug 2025 12:00:00 GMT",
"human": {
"utc": "Saturday, August 2, 2025 at 12:00:00 PM UTC",
"timezone": "UTC",
"local": "08/02/2025, 12:00:00 PM UTC"
},
"relative": "in 2 years"
} Errors
| Status | When |
|---|---|
| 400 | Missing or invalid timestamp, or an unknown format/unit. |
| 404 | Unknown route. |
Errors are returned as JSON: {"success": false, "error": "..."}.
Responses include Access-Control-Allow-Origin: *, so the endpoint is callable from any browser page.
Want the conversion logic in your own stack? See how to convert Unix timestamps in Python or try the free online Unix timestamp converter.