# Unix timestamp converter

> Convert Unix seconds or milliseconds to a UTC date, or an ISO date with an explicit timezone to Unix time. Check units without guessing.

- Canonical HTML: [https://unrust.dev/tools/unix-timestamp-converter](https://unrust.dev/tools/unix-timestamp-converter)
- Markdown representation: [https://unrust.dev/tools/unix-timestamp-converter/index.md](https://unrust.dev/tools/unix-timestamp-converter/index.md)

## How to use the tool

Choose Unix seconds, milliseconds or an ISO date. Unix inputs must be whole numbers. ISO input requires seconds and Z or a numeric offset, with up to three fractional digits. Output is UTC; years 0000–9999 are supported. Leap seconds and named timezone rules are outside this tool’s scope.

## Worked example

1704067200 Unix seconds is 2024-01-01T00:00:00.000Z. The same number in milliseconds is 1970-01-20T17:21:07.200Z. The unit changes the result, so the converter never guesses from the number of digits.

```text
1704067200 seconds
= 2024-01-01T00:00:00.000Z
```

Inputs stay in your browser. These are open learning examples, not scored diagnostic drills.

[Debug timestamps: seconds, milliseconds and timezones](https://unrust.dev/blog/unix-seconds-milliseconds-and-timezones/index.md)

[MDN: Date.parse and date formats](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse)

## Practice tracing a unit mismatch

An API promises Unix seconds but a consumer passes the number directly to new Date(value). Which boundary should you inspect first?

Inspect the seconds-to-milliseconds conversion at the consumer boundary. JavaScript’s numeric Date constructor uses milliseconds. Test one known instant and make the unit explicit; a formatted date alone cannot tell you what the producer intended.

Original open example, not a scored drill. Close tools before an unassisted session.

[Practice debugging one assumption at a time](https://unrust.dev/guides/debugging-without-ai/index.md)

[Take the free diagnostic](https://unrust.dev/diagnostic/index.md)
