Unix timestamp converter

Turn an epoch value into a readable date, or a date into seconds or milliseconds since 1970-01-01 UTC.

Useful when a log, JWT exp, or API payload hands you a naked number and you need to know what day that was.

Client-side only. Uses the browser Date API. Nothing is uploaded.


One number, two common units

Unix time counts how far you are from 1970-01-01T00:00:00Z. APIs disagree on the unit. Here is the same instant written both ways (example fixed for the page, not live):

UnitValueReadable UTC
Seconds17257536002024-09-08 00:00:00 UTC
Milliseconds1725753600000same instant
Wrong: treat ms as seconds1725753600000 as seconds~year 56658 (garbage)

Rule of thumb: ~10 digits means seconds, ~13 digits means milliseconds. When in doubt, flip the Unit control and see which date looks human.

Walkthrough: decode a log line

Suppose a CDN log shows ts=1711929600. Pick Seconds, paste the number, hit Timestamp to date. You should land on 2024-04-01T00:00:00.000Z in the UTC field. Local will shift by your offset (Pacific would show 2024-03-31 evening).

Going the other way: set the datetime field to a local wall time you care about, choose the unit, then Date to timestamp. Copy that into a JWT exp, a cache TTL math check, or a SQL to_timestamp call.

Timezone is not stored in the number

An epoch is a single instant on the timeline. It has no timezone baked in. This page shows UTC always, plus a local rendering from your browser. If a teammate in another city converts the same number, their Local line differs and their UTC line matches. That is expected.

When you type into the datetime-local control, the browser treats that as local wall time and converts to epoch. If you meant UTC wall time, either set your OS clock to UTC for the conversion, or paste an ISO string ending in Z into a separate check (this control does not accept a Z suffix).

Where this converter stops

FAQ

Does this Unix timestamp converter upload my values?

No. All conversion uses the browser Date API on this page. ToolPetal has no backend for timestamps.

How do I tell seconds from milliseconds?

Seconds since 1970-01-01 are about 10 digits today (around 1.7e9). Milliseconds are about 13 digits (around 1.7e12). If a value looks like 13 digits, pick milliseconds. Wrong unit shifts the date by roughly 1000x.

Is the local time my machine timezone?

Yes. Local output uses the timezone of the browser you are in right now. UTC is always the same regardless of where you sit.

What about dates before 1970 or after 2038?

JavaScript Date uses a millisecond Number, so negative epochs (before 1970) and dates past 2038 work in modern browsers. The classic 32-bit signed Unix time overflow in 2038 is a problem for old C systems, not for this page.