Skip to content
PocketDesk
Your files are processed on your device, never uploaded

Unix timestamp converter

  • On device

Result

Working

How to convert a Unix timestamp

  1. Paste a timestamp such as 1700000000 into the box. You can also type a date like 2024-03-01T12:00:00Z.
  2. Leave Unit on Auto-detect, or choose seconds, milliseconds, microseconds or nanoseconds.
  3. Read the date in UTC, in your local time and in ISO 8601, along with the Unix seconds and a relative time such as “3 hours ago”. Leave the box empty to see the current time.

The page address updates with your input, so you can bookmark or share a conversion.

What a Unix timestamp is

A Unix timestamp counts the time since the epoch, midnight UTC on 1 January 1970. Programs, databases and APIs use it because one number is easy to store, sort and compare, and it does not depend on a time zone. JavaScript uses milliseconds, while many databases, shells and languages use seconds, which is why the unit matters.

A timestamp with 10 digits is almost always seconds, with 13 digits milliseconds, with 16 digits microseconds and with 19 digits nanoseconds. The auto-detect rule follows that pattern, and you can override it when a value is unusual, for example a small number of milliseconds.

The formats you get

  • UTC shows the moment in Coordinated Universal Time.
  • Local shows it in your device’s time zone, with its name.
  • ISO 8601, like 2023-11-14T22:13:20.000Z, is the standard text format for APIs and logs.
  • Relative says how far the date is from now, using your browser’s built-in language support.

Tips

  • If a converted date shows 1970, the value was probably seconds read as milliseconds. Change the unit.
  • Store times in UTC and convert them to local time only when you show them to a person.
  • Negative timestamps are dates before 1970. They work too.
  • To check when a scheduled job will run, use the cron expression explainer.
  • Large timestamp values can also be inspected in binary or hex with the number base converter.

Everything is calculated in your browser using the current time of your device.

Questions

What is a Unix timestamp?

The number of seconds since 1 January 1970 at 00:00 UTC, known as the Unix epoch. It is a simple, time zone independent way to store a moment in time.

How does it tell seconds from milliseconds?

By size. Numbers under 100 billion are read as seconds, up to 100 trillion as milliseconds, then microseconds and nanoseconds. You can also pick the unit yourself.

Can I convert a date back to a timestamp?

Yes. Type a date such as 2024-03-01T12:00:00Z and the Unix seconds and milliseconds are shown.

Why is my local time different from UTC?

UTC is the same everywhere. Local time adds your time zone offset and any daylight saving shift, so both are shown.

What is the year 2038 problem?

Systems that store seconds in a signed 32-bit number overflow on 19 January 2038. Most modern systems use 64 bits and are not affected.

More developer tools