Unix Timestamp Converter

Convert between Unix timestamps and readable dates in any time zone. Seconds or milliseconds are detected for you — and nothing you type leaves your browser.

About this tool

A Unix timestamp is a single number: the count of seconds since 1 January 1970 at 00:00 UTC. It is unambiguous, it sorts correctly, and it carries no time zone — which is exactly why every log line, API response and database row is full of them, and exactly why reading one by eye is hopeless.

This tool converts in both directions. Paste a timestamp and you get the instant it refers to — in UTC, in your own time zone, and in a short list of others. Or pick a date and a zone and get the number back. Seconds and milliseconds are told apart automatically, so you never have to count digits.

Everything runs locally in your browser. No timestamp you enter is sent anywhere, and nothing is logged.

Why the date side ignores the browser’s own date parser

Because the browser would read the string in your computer’s time zone, and you have already chosen a different one. The date is taken apart into plain year, month, day and clock digits, and the zone is applied once, in a single place.

There is a trap in the reverse direction. A datetime field hands over text like 2026-03-29T02:30, and passing that straight to the browser’s Date constructor interprets it in the local zone — silently, and before your chosen zone is ever consulted. Pick Tokyo and the tool would still, in effect, be computing in London.

So the value is parsed by hand instead, into six bare numbers: year, month, day, hour, minute, second. Nothing in that step knows about time zones at all. The only place a zone enters is the conversion that turns those numbers into an instant.

One zone, one interpretation, one result. The year is read as four to six digits, so unusual but real values outside the usual range still go through rather than being rejected on a technicality.

What the timestamp box quietly accepts

Spaces, underscores and commas are stripped before the number is read, so 1_700_000_000 and 1 700 000 000 both work. A leading sign and a decimal point are allowed too; anything left over is reported plainly instead of being read as zero.

Grouping marks are there for human eyes, not for the parser. Underscores, spaces and commas are removed from the input first, so a timestamp copied out of a config file or a log viewer keeps working. A fractional part is kept: 1700000000.5 is 500 milliseconds past that second.

A minus sign means what you would expect — a moment before 1 January 1970 — and it is a normal value, not an error. The sign and any decimals survive the unit multiplication, so the same instant round-trips unchanged.

What is not accepted is a number wrapped in anything else. Letters, stray symbols or a value that overflows a browser date each get their own message; the box never falls back to reading an unreadable entry as zero, which is the failure mode that quietly produces a 1970 date.

What you get when your own time zone cannot be read

The table falls back to UTC rather than guessing from your clock. An offset is not a zone — the same number can stand for many places on a given day — and a guess would look like a confident reading of the wrong one.

The local zone is taken from the runtime’s own idea of it, then checked against the known zone list before it is trusted. If the lookup fails or returns something unrecognised, the fallback is UTC.

Reconstructing a zone from the current offset would be worse than nothing. A fixed offset cannot say whether summer time is in force, so a zone built that way would be right for part of the year and wrong for the rest, with no sign that it had drifted.

UTC, by contrast, is never ambiguous and never moves. When it appears as your local column you can tell at a glance that no local zone was available, rather than being handed a plausible offset that quietly goes wrong twice a year.

Ten digits are seconds, thirteen are milliseconds, and mixing them is a factor of a thousand

The dividing line is 1e11: below it the value is seconds, at or above it is milliseconds. That threshold is not arbitrary — 1e11 seconds is roughly the year 5138, while 1e11 milliseconds is 1973, so the two kinds of real input fall cleanly on either side.

The common mistake runs the other way: treating a 13-digit millisecond value as seconds turns 2023 into a date some fifty thousand years out. Nothing errors; you simply get an absurd date that still looks like a number, and readers tend to suspect their own paste first.

The date side has its own second failure mode: the browser date parser is not used. It interprets strings like 2020-03-04 according to the runtime, so the same input can land a day apart on different machines. Dates are parsed with an explicit pattern instead.

One more boundary is not being able to read your time zone. When the system zone is missing or unrecognised the page does not pretend to know: it reports the UTC reading and says so. Passing UTC off as local time is out by up to a day, and only shows at the moments that cross midnight.

Frequently asked questions

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

This tool detects it. Anything below 100,000,000,000 (1e11) is read as seconds, and anything at or above it as milliseconds — which covers every realistic value: 1e11 seconds is the year 5138, while 1e11 milliseconds is 1973. You can also pin the unit yourself when your data is unusual.

Why does the same timestamp show a different date in different time zones?

Because a timestamp is one instant, and a time zone is only a way of writing that instant down. 1700000000 is a single moment in time; it reads 22:13 in London and 06:13 the next morning in Shanghai. The instant never moves — the wall-clock reading does.

Does it handle daylight saving time?

Yes. Each offset shown is the real one for that specific instant, summer time included. A handful of wall-clock times never happen on their day — the hour a spring-forward jumps over — and the date-to-timestamp side tells you when you have picked one of them.

What is the largest timestamp it accepts?

The range a browser date can represent: roughly ±100,000,000 days from 1 January 1970, which is about ±273,000 years. Past that a value is not a date any more, so the tool says so rather than printing “Invalid Date”.

Is 1 January 1970 a special date?

Only by convention. Unix was written at Bell Labs in 1969–70 and its authors needed a round starting point, so they took midnight UTC at the beginning of 1970. Timestamps before it are simply negative numbers.

Can I use it offline?

Yes — no server is involved. The conversion is plain arithmetic on your own device, so the page keeps working with no connection at all.

Related tools