Unix timestamp converter

Paste a Unix timestamp and read the moment it refers to — in UTC, in your own time zone with the offset stated, as an ISO 8601 string, and as a phrase like "eight months ago". Whether the number is seconds or milliseconds is worked out from its size, and the answer says which it decided.

The guess is right almost always, and the answer says which it used.

Result

The answer appears here as you type.

  • Where it runs

    Nothing is uploaded, because there is no file — it is worked out in this page.

  • No queue, no account

    It answers as fast as your machine can, and it never asks who you are.

  • As often as you like

    Nothing is counted and nothing is capped — answering again costs us nothing.

How it works

  1. Paste the number into the box. It converts as you type.
  2. Check the unit it chose. Force it if you know better.
  3. Read the moment in UTC, in your own zone, and as an ISO string.

Seconds or milliseconds is the only real question

A Unix timestamp is a count of seconds since 1 January 1970 UTC. JavaScript, Java and most log pipelines count milliseconds instead. So the same digits mean two moments that can be decades apart, and nothing about the number itself says which convention produced it.

The size settles it in practice. A ten-digit value is seconds until the year 2286; a thirteen-digit value has been milliseconds since 1973. This page picks on that basis and then tells you what it picked, which is the part most converters leave out — one that guesses silently and guesses wrong shows a date in January 1970 with no explanation attached.

The zone the answer is in

UTC is the timestamp itself: an epoch value carries no zone, so the UTC rendering is a fact rather than a choice. The local line is your device setting, and the offset is printed beside it so it is never left implied.

That distinction matters more than it looks when the number came from somewhere else. A timestamp out of a production log refers to a moment, and the moment is the same everywhere — but the wall-clock time your colleague quotes from the same log is in their zone, and comparing the two by eye is where an hour goes missing. Compare the UTC line, or compare the number.

Why the ISO string is the one to paste elsewhere

ISO 8601 with a trailing `Z` is unambiguous: it names the moment, the zone and the precision in one string, and every language parses it. `2023-11-14T22:13:20.000Z` cannot be misread as a day-month-year or a month-day-year, which the same date written with slashes very much can.

That ambiguity is not theoretical. `03/04/2024` is 3 April in most of the world and 4 March in the United States, and a spreadsheet will silently interpret it according to its own locale. If a date is going into a ticket, a message or another system, the ISO form is the one that survives the trip.

The ISO week is not the week of the year

ISO 8601 weeks start on Monday, and week 1 is the week containing the first Thursday of the year. That means 1 January can belong to week 52 or 53 of the *previous* year — 1 January 2021 is in 2020-W53 — and that a year can have 53 weeks.

The obvious implementation, dividing the day of the year by seven, disagrees with that for a fortnight every year. It matters because ISO weeks are what reporting tools, payroll systems and most of Europe use, so a report labelled "week 1" can cover days in two different years and be entirely correct.

The year 2038, and whether it applies to you

A signed 32-bit integer holding seconds overflows on 19 January 2038. Systems still using `time_t` as a 32-bit value will wrap to 1901 — the same shape of problem as the year 2000, with a narrower blast radius and a harder fix, because it is embedded firmware and old file formats rather than business software.

It does not apply to anything on this page or to anything written in the last decade in a mainstream language. JavaScript uses a double, which holds milliseconds exactly to the year 275760. Sixty-four-bit `time_t` covers longer than the universe has existed. If you are looking at a timestamp in a browser, 2038 is somebody else problem.

Timestamps that look wrong, and usually are not

A date in 1970 nearly always means milliseconds were read as seconds — or that the value was zero or empty and something coerced it to zero, which is the epoch itself. A date in the far future usually means the reverse: seconds read as milliseconds, or a timestamp in microseconds or nanoseconds, which some databases and tracing systems emit.

Microseconds are sixteen digits and nanoseconds nineteen. Neither is handled automatically here, because both are rare enough that guessing them would make the common guess worse. Divide by a thousand or a million first, and the value falls into a range this page reads correctly.

Unix timestamp converter: common questions

Is my timestamp in seconds or milliseconds?

Count the digits. Ten means seconds for any date between 2001 and 2286; thirteen means milliseconds. This page decides on that basis and tells you which it used, so you can override it if the number came from somewhere unusual.

Why does my timestamp show a date in 1970?

Almost always because milliseconds were read as seconds — a thirteen-digit value read as seconds lands far in the future, and a ten-digit one read as milliseconds lands a fortnight after the epoch. The other cause is a value that was zero or empty, since the epoch itself is 1 January 1970.

Which time zone is the local line in?

Whatever this device is set to, with the offset printed beside it. There is no server here and no configured zone. If you are comparing against a colleague reading of the same log, compare the UTC line or the number itself — that is where an hour usually goes missing.

Why is the ISO week different from the week I expected?

Because ISO weeks start on Monday and week 1 is the one containing the first Thursday of the year. 1 January 2021 falls in week 53 of 2020, and some years have 53 weeks. Dividing the day of the year by seven gives a different answer for about a fortnight annually.

Is the timestamp I paste sent anywhere?

No. The arithmetic happens in this page and the network panel will show nothing leaving. Timestamps rarely look sensitive, but they come out of logs and payloads that often are, and there is no reason for one to travel to be converted.

Other tools