How to Convert Unix Timestamps

By Ramanathan Aug 26, 2026 1 min read Unix Timestamp Converter

A Unix timestamp is the number of seconds since midnight UTC on 1 January 1970 — the "epoch". It shows up in logs, databases, JWTs, and APIs because it's a single unambiguous number. Here's how to work with it.

Seconds or milliseconds?

Two conventions are common, and telling them apart is the usual gotcha:

  • Seconds — a 10-digit number today, e.g. 1717000000 (used by Unix, Postgres, JWT exp).
  • Milliseconds — a 13-digit number, e.g. 1717000000000 (used by JavaScript's Date.now()).

A quick rule: 13 or more digits is milliseconds; 10 is seconds. Multiply seconds by 1000 to get milliseconds.

UTC vs local time

The timestamp itself is always UTC — it has no time zone. The display is where zones come in. 2024-05-29T16:26:40Z (the Z means UTC) is the same instant everywhere; your local clock just shows it shifted by your offset. When you convert, always check whether you're reading the UTC or the local row.

Converting back

Going from a date to a timestamp is just the reverse: parse the date into an instant, then read its epoch seconds or milliseconds. A date with no time zone is interpreted in your local zone, so 2024-05-29 12:00 means noon where you are.

Related

Part of The Complete Guide to Dates and Times; see also What Is Unix Time?. For scheduling, the Cron Expression Parser; and the JWT Decoder, whose iat and exp claims are Unix timestamps.

Try it

Paste a timestamp or a date and see every format at once, with a live clock — everything runs in your browser, nothing uploaded.

About the author

Ramanathan · Software Engineer & Solutions Architect

I'm a Software Engineer and Solutions Architect with 20+ years of experience building enterprise applications across BFSI, Healthcare, Retail, Manufacturing, and Industrial Automation. I've spent those two decades living in JSON, tokens, regexes, and config files — so I built the fast, private, no-login developer tools I always wanted to reach for myself.

Last updated: Aug 26, 2026