How-to guide

How to Convert a Unix Timestamp

A Unix timestamp counts seconds since 1 January 1970 UTC. To convert one, paste it into a timestamp converter and read the UTC and local results. Check the digit count first: ten digits are seconds, thirteen are milliseconds. Feeding milliseconds to a seconds-based converter puts the date tens of thousands of years into the future.

Unix Timestamp Converter

Convert between Unix timestamps and human dates.

Open the tool

A Unix timestamp is a single number with no time zone attached — it is an instant, counted in seconds from the epoch at midnight UTC on 1 January 1970. That simplicity is the point: two systems anywhere in the world agree on what it means without negotiating a format.

Nearly every problem with timestamps comes from one of two places: the unit, and the display. The number itself is unambiguous; whether it counts seconds or milliseconds is not, and neither is the time zone you render it in.

Step by step

  1. Count the digits

    A ten-digit number is seconds and lands in the present era. Thirteen digits is milliseconds. Sixteen is microseconds, which some databases and tracing systems use. Getting this wrong is the single most common timestamp bug.

  2. Paste it into the converter

    The result is shown in both UTC and your own local time. UTC is the value the timestamp actually encodes; local time is a rendering of it for you.

  3. Decide which one you need

    Use UTC when comparing against logs, other systems or anything shared. Use local time only when the answer is for a person in a known place. Storing local time is how the ambiguity gets in.

  4. Convert a date back to a timestamp

    Enter the date and read the epoch value. Be explicit about the time zone you mean, because a date with no zone is interpreted in yours, and that shifts the number by hours.

  5. Watch for zero and negative values

    A timestamp of 0 is the epoch itself — 1 January 1970 — and usually means an uninitialised field rather than a real date. Negative values are legal and represent dates before 1970.

Example

The same instant, in the two units systems most often confuse.

Timestamp

1754521200          (10 digits, seconds)
1754521200000       (13 digits, milliseconds)

Result

7 Aug 2025, 00:00:00 UTC
7 Aug 2025, 00:00:00 UTC

Read as seconds, the 13-digit value
would land in the year 57 000.

Frequently asked questions

Is my timestamp in seconds or milliseconds?
Count the digits. Ten digits is seconds and gives a date in the current era. Thirteen is milliseconds — JavaScript's Date.now() returns these, which is why JavaScript and most other languages disagree by a factor of a thousand.
Why does my date look a few hours off?
You are comparing a UTC value against a local rendering, or the other way round. The timestamp itself has no time zone; the difference appears only when it is displayed. Compare UTC to UTC and the discrepancy disappears.
What is the 2038 problem?
A signed 32-bit integer overflows on 19 January 2038, wrapping to a negative number and a date in 1901. Modern systems use 64-bit timestamps and are unaffected, but embedded devices and old database columns can still be.
Do timestamps account for leap seconds?
No. Unix time deliberately pretends every day has exactly 86,400 seconds, so a leap second is either repeated or skipped depending on the system. That keeps the arithmetic simple at the cost of being very slightly out of step with astronomical time.
Should I store dates as timestamps?
For an instant in time, yes — it is unambiguous and sorts correctly. For a calendar date such as a birthday, store the date itself: a timestamp implies a moment, and converting it across time zones can shift it to the previous day.

Tools used in this guide

All tools →
All guides →

Last reviewed .