Dev Tools
All tools

Unix Timestamp Converter

Convert a timestamp (seconds or milliseconds) to a UTC or local date, or a date back to a timestamp.

Current Unix timestamp (seconds)

Local:

Timestamp → Date

Date → Timestamp

A Unix timestamp is a single number that counts the time elapsed since January 1, 1970, 00:00:00 UTC (the epoch), measured in seconds or milliseconds. Logs, databases, and API responses often store time as a value like 1700000000, but it is hard for a human to tell at a glance what moment that represents. This tool unpacks a timestamp into your local time, UTC, and ISO 8601 at once, and converts a specific date back into a timestamp.

A timestamp is an absolute instant with no time zone attached. The same number shows different hours and minutes depending on the zone you display it in, so this tool presents the same moment in both UTC and your local time to cut down on confusion. It also provides the ISO 8601 form (e.g. 2023-11-14T22:13:20.000Z) that you can paste straight into an API or your code. The unit is easy to mix up: seconds are usually 10 digits, while milliseconds are 13 digits.

At the top of the page, the current timestamp refreshes every second, so you can use it right away for expiry calculations or test data. Every calculation happens in your browser, and no value is ever sent anywhere.

How to Use

  1. 1

    Check the current value

    The top card shows the current Unix timestamp (in seconds), refreshing every second, with copy buttons for seconds and milliseconds.

  2. 2

    Enter a timestamp

    Type the timestamp number you want to convert, then choose whether the value is in seconds or milliseconds.

  3. 3

    Read the date

    The result is shown in three formats — local time, UTC, and ISO 8601 — each with its own copy button.

  4. 4

    Convert back

    Use the date-and-time picker at the bottom to choose a moment, and the matching timestamp (seconds and milliseconds) is calculated.

When It's Useful

Decode time values in logs and DBs

Instantly unpack a time stored as a number like 1700000000 into local time and UTC to see when it actually is.

Calculate token expiry

When working with a JWT's exp or a cache TTL, turn a specific date into a timestamp or the other way around.

Build test data

Copy the current timestamp at the top, or convert a date of your choice, to drop into fixtures and test cases.

Convert between seconds and milliseconds

Check the digit count to catch time bugs caused by passing a millisecond value to an API that expects seconds.

Tips

  • Second-based timestamps are usually 10 digits, while millisecond-based ones are 13 digits. The digit count is a quick way to guess the unit.
  • JavaScript's Date.now() returns milliseconds, so divide by 1000 when you need seconds.
  • Check the unit (seconds or milliseconds) of a time field in your database or API docs first to avoid conversion mistakes.
  • The date picker for converting back is interpreted in your browser's local time zone, so results can differ on machines set to another zone.
  • The trailing Z in ISO 8601 means UTC (zero offset). When writing a local time as ISO, add the correct offset (for example +09:00 for KST) to stay accurate.
  • Picking the wrong unit lands you near 1970 (reading milliseconds as seconds) or far in the future (reading seconds as milliseconds), so if a result looks off, try switching the unit first.

FAQ

How do I know whether a timestamp is in seconds or milliseconds?

Generally, seconds are a 10-digit number and milliseconds are 13 digits. Picking the wrong unit lands the result near 1970 or far in the future, so check the digit count.

Is it correct that local time and UTC differ by some hours?

Yes. UTC and your local time are the same instant expressed in two zones, so the offset between them is expected. For example, Korea Standard Time (KST) is 9 hours ahead of UTC.

Is my input sent to a server?

No. Every conversion happens entirely in your browser's JavaScript and nothing is sent anywhere.

Are negative timestamps supported?

Negative values, which represent times before the epoch (1970), are converted too, though display may be limited in some environments.

The current time looks different from the real time.

The current timestamp is based on your device's clock. If the device time is off, the value will be too, so check your system time.

Why is the Unix timestamp based on 1970?

Early Unix systems chose January 1, 1970, 00:00:00 UTC as the reference point (the epoch), and that convention has carried on as the standard ever since.

Why is the ISO 8601 format shown separately?

ISO 8601 is an international standard string that includes time zone information, making it convenient to use directly in API requests and responses or in code. The trailing Z means UTC.

The date-to-timestamp result is not what I expected.

The date picker interprets your input in the browser's local time zone. If you entered it in Korea, it is read as KST when computing the timestamp, so account for the offset if you need a different zone.

Related Tools