Timestamp Converter

Convert Unix timestamps, ISO 8601, and human-readable dates entirely in your browser.

Conversion runs locally using the browser's built-in Date and Intl APIs, so no timestamp you enter is ever sent to a server.

Timestamp Converter

Convert between Unix timestamps, ISO 8601, and human-readable dates.

Build a Timestamp

Pick a date and time, choose how to interpret it, and get the equivalent Unix timestamp.

Why Unix Timestamps Are Ambiguous Without Context

A Unix timestamp counts seconds (or milliseconds) since January 1, 1970 00:00:00 UTC, the Unix epoch. That single number represents one exact instant, the same instant everywhere on Earth, which is exactly why it's the standard way to store a point in time in a database, a log line, or an API payload: there's no time zone to get wrong when the value itself is time-zone-free.

The ambiguity shows up the moment a person needs to read it. Seconds versus milliseconds is the most common mix-up: JavaScript's Date.now() returns milliseconds, while most Unix tooling and many APIs (including Python's time.time()) return seconds. Feed a millisecond value into code expecting seconds and you land on a date roughly 47,000 years in the future; feed a seconds value into code expecting milliseconds and you land somewhere in 1970. This tool detects which one you've pasted by magnitude: ten digits is almost certainly seconds, thirteen digits is almost certainly milliseconds.

The second source of confusion is display time zone. Once you convert a timestamp to a calendar date and clock time, you have to pick whose clock: UTC, your own local time zone, or some other zone entirely. The underlying instant hasn't changed, but the digits you read absolutely have. That's why this tool always shows the UTC representation alongside your local time and a time zone you choose, rather than picking one and hiding the rest.

The reverse direction has its own trap. When you build a timestamp from a date and time you typed in, that date and time on its own doesn't say what zone it's in. “2024-01-15 09:00” is a different instant depending on whether it means 9am in your local time zone or 9am UTC. This tool makes you choose explicitly, rather than silently assuming one or the other, since that assumption is exactly where off-by-several-hours bugs come from in scheduling and logging code.

Common Use Cases

Reading a timestamp from a log line or database row

Pasting a raw epoch value from a log entry or a database column immediately shows the actual date and time, in both UTC and your local zone, without writing a throwaway script.

Debugging a seconds-vs-milliseconds mismatch

When a date renders as 1970 or the far future, pasting the raw value here confirms immediately whether the two systems involved disagree on the unit.

Constructing a timestamp for an API request

Picking a date and time in the Build section and choosing local or UTC produces the exact Unix value to paste into a request body or query parameter that expects one.

Checking how long ago (or from now) a timestamp is

The relative time output turns a raw epoch value into a human phrase like “3 days ago,” which is often the actual question being asked when eyeballing a timestamp.

Frequently Asked Questions

Is my input sent to a server to be converted?

No. Parsing and conversion happen entirely in your browser using the native JavaScript Date and Intl APIs. Nothing is transmitted anywhere.

How does the tool know if I entered seconds or milliseconds?

It checks the magnitude of the number. A 10-digit value (up to roughly the year 2286) is treated as seconds; anything at or above 10^12 is treated as milliseconds, since a seconds-based timestamp would not reach that range for centuries.

Why does the "Build a Timestamp" section ask whether to treat my input as local time or UTC?

A date and time on its own is ambiguous without a time zone. Picking "local time" interprets it using your browser's time zone, while "UTC" interprets the same numbers as already being in UTC. Both produce a different underlying Unix timestamp.

What is a Unix timestamp?

A Unix timestamp is the number of seconds (or milliseconds, in JavaScript's case) that have elapsed since January 1, 1970 00:00:00 UTC, known as the Unix epoch. It represents a single instant in time independent of any time zone.