Hype StackHypeStack

Unix timestamp converter.

An epoch converter that guesses the unit for you. Paste a timestamp, get the date in UTC and your time zone.

  • Free
  • No signup
  • Runs in your browser

Current Unix time

 

 

How it works.

  1. 1

    Paste a timestamp in seconds, milliseconds, microseconds or nanoseconds.

  2. 2

    Read it as UTC, your local time, ISO 8601, and how long ago it was.

  3. 3

    Or pick a date and time to get its timestamp. Copy any value with one click.

What a Unix timestamp is

The number of seconds since 00:00:00 UTC on 1 January 1970, not counting leap seconds. It is the same number everywhere on Earth at the same moment. Time zones only come in when you show it to a person.

That makes it the safe way to store and send time. JWTs, most APIs and Unix tools use seconds. JavaScript's Date.now() uses milliseconds, which is where most bugs start.

Seconds or milliseconds?

The converter goes by length. Today a timestamp in seconds has 10 digits, milliseconds 13, microseconds 16, and nanoseconds 19. The detected unit is shown under the input, so you can see what it assumed.

If a date comes out in 1970, milliseconds were read as seconds somewhere, or the other way round. Multiply or divide by 1000 at the boundary where the value changes hands.

Questions, answered.

How do I convert a Unix timestamp to a date?

Paste it into the converter above. It shows the date in UTC, in your own time zone and as ISO 8601, and works out whether the number is in seconds or milliseconds.

How do I get the current Unix timestamp?

It is ticking at the top of this page. In code: Math.floor(Date.now() / 1000) in JavaScript, int(time.time()) in Python, date +%s in a shell, and extract(epoch from now()) in Postgres.

Are Unix timestamps in UTC?

A Unix timestamp has no time zone at all. It counts seconds from a moment defined in UTC, so converting it to UTC needs no offset. Your local time is the same moment with your offset applied.

What is the year 2038 problem?

Systems that store the timestamp as a signed 32-bit number run out at 2147483647, which is 03:14:07 UTC on 19 January 2038. The next second wraps to 1901. 64-bit timestamps don't have this limit.

Why does my timestamp convert to 1970?

The number is too small for the unit it was read in. A milliseconds value divided by 1000 one time too many, or a seconds value read as milliseconds, both land close to 1 January 1970.

More free tools.

All tools

Time sorted. Now the jobs that need it.

Email every user a weekly summary on Monday at 9:00.. Delete expired invitations every night.. Retry failed webhooks in the background.

The free Hype Stack template runs cron jobs inside the API, with Postgres advisory locks so each run fires once, and a pg-boss queue for background work.