Unix Timestamp Converter: Read Epoch Values in Any Time Zone

A Unix timestamp looks like a harmless integer until you have to explain it to someone else. The number 1800000000 is a single instant, yet it prints as 10:00 in Chisinau, 03:00 in New York and 17:00 in Tokyo, and each of those clocks is correct. The value never changes; only the frame you read it in does. This converter keeps both frames on one screen: paste the number and the date appears, edit the date and the number comes back, with the zone offset attached to every line that could otherwise be misread.

What a Unix timestamp actually counts

Unix time counts the seconds that have passed since 00:00:00 UTC on 1 January 1970. That instant is the epoch, and the count is a plain integer, which is why databases, APIs and log files prefer it over a formatted string. There is no month name to localize, no separator to negotiate and no ambiguity about which number is the day. Sorting a column of timestamps sorts it chronologically, and comparing two rows is a subtraction.

The count deliberately ignores leap seconds. A minute in Unix time is always 60 seconds, even in years when UTC inserted an extra second to keep civil time aligned with the rotation of the Earth. The offset between UTC and International Atomic Time has sat at 37 seconds since 2017, and the CGPM has decided to stop inserting leap seconds from 20 May 2027, so the gap becomes fixed rather than occasional. For most software this distinction never surfaces, but it explains why a timestamp converted to TAI comes out 37 seconds later than the same instant converted to UTC, and why a converter that shows TAI has to state which constant it uses.

The familiar landmarks are easy to verify. Unix time passed one billion seconds at 2001-09-09T01:46:40Z, a date celebrated as the billennium. The signed 32-bit limit of 2147483647 lands at 2038-01-19T03:14:07Z, the moment usually called the Y2038 problem. Both numbers are useful sanity checks: if a value converts to a date far outside the range of your system, the unit or the epoch is probably wrong rather than the clock.

Why the epoch sits at 1970 and why seconds won

The date was chosen by the people building Unix as a round starting point that was early enough to cover existing dates and late enough to fit inside a signed 32-bit integer. Early Unix measured time in sixtieths of a second, then in ticks, and only by the seventh edition in 1979 settled on whole seconds. POSIX later made the format part of the standard, which is why the same integer shows up in C, Python, JavaScript, PHP and a long list of databases.

Seconds won for a practical reason: one number covers every instant between 1901 and 2038 in a signed 32-bit field, and a 64-bit field extends that range far beyond any date a business cares about. Milliseconds arrived when browsers and mobile runtimes needed sub-second precision, and microseconds and nanoseconds followed in tracing tools and high-resolution clocks. The unit changed, the epoch did not, so a value with the wrong unit still points at a real date, just not the one the author meant.

Storage explains the rest of the preference. A Unix timestamp takes 4 or 8 bytes as an integer, while an ISO 8601 string takes 20 to 30 bytes, and an index over integers is smaller and faster to scan. When a table holds millions of events, that difference in width and comparison cost is measurable, and it is why the raw integer often survives in the database even when the API in front of it returns a formatted string.

Reading the unit before you read the date

A ten-digit number is almost always seconds, a thirteen-digit number is milliseconds, sixteen digits is microseconds and nineteen is nanoseconds. The converter applies that rule when the unit selector sits on auto, then prints what it detected under the field, so a value that was pasted from a log cannot silently become the wrong decade.

The digits are a heuristic, not a law. A timestamp in milliseconds from 1973 has thirteen digits, and so does a timestamp in microseconds from 2001, which is why the unit can be pinned by hand. The same applies to values that arrive without a unit at all: a column exported from a database may mix formats if different services wrote to it over the years, and the only defense is to read the printed unit before copying the result.

Unit Digits Example for 2027-01-15T08:00:00Z
Seconds 10 1800000000
Milliseconds 13 1800000000000
Microseconds 16 1800000000000000
Nanoseconds 19 1800000000000000000

Large values are where floating point quietly breaks. A nineteen-digit nanosecond stamp is far beyond the exact integer range of a JavaScript number, so a naive parser rounds the last digits and the converted time drifts by microseconds or worse. This converter keeps the input as an integer, converts it exactly and only reduces to milliseconds for display, which keeps the printed second and the printed date consistent with each other.

Turning an instant into a wall clock

The conversion itself is one subtraction and one division: the epoch value becomes an instant, and the zone decides how that instant is written. Pasting 1800000000000 with the zone set to Europe/Chisinau gives 10:00:00 with an offset badge of GMT+02:00, while the same value in America/New_York gives 03:00:00 and GMT-05:00. The ISO string underneath carries the offset, so a value copied into a ticket or a chat cannot be mistaken for a different clock.

The zone list comes from the browser, which currently reports 419 IANA names in Chromium. Search works on the start of the name first and then on any substring, so typing tokyo or kolkata narrows the list quickly. The chosen zone is remembered in local storage, which matters when the same page is opened several times during an incident and the reader should not have to find the same city again.

Going the other direction is just as direct. Type an ISO 8601 date, a numeric date in day-first or month-first order, an RFC 2822 string or an English phrase such as next Friday at 3 PM, and the epoch value appears in the first field. The numeric order selector exists because 03/04/2027 is March 4 in one convention and April 3 in another, and the page refuses to guess silently. A date without a time is resolved at the start of the day by default, with noon available for cases where a date-only value should not sit on a boundary.

DST gaps and overlaps in a named zone

A wall clock is not a continuous function of the instant. When a zone springs forward, an hour of local time never happens, and when it falls back, an hour happens twice. Converting a date that has no offset therefore has two possible answers or none, and a converter that hides this produces times that look plausible and are wrong by an hour.

Europe/Chisinau in 2027 makes the case concrete. Asking for 2027-03-28 03:30 lands in the spring gap, because the clock jumps from 03:00 to 04:00, and the page resolves the wall time forward and shows a hint instead of returning a silent value. Asking for 2027-10-31 03:30 lands in the autumn overlap, where the same reading occurs twice, once at 00:30Z and once at 01:30Z, and the page says so. The 02:30 request on the same spring day is unremarkable: it exists, because the transition happens at 03:00.

Worked example with 1800000000000:

Zone Local time Offset
UTC 08:00:00 +00:00
Europe/Chisinau 10:00:00 +02:00
America/New_York 03:00:00 -05:00
Asia/Tokyo 17:00:00 +09:00
Asia/Kolkata 13:30:00 +05:30

The half-hour offset in Kolkata is the reason the offset is printed as a badge rather than assumed to be a whole hour. Zones with 45-minute offsets exist as well, and a table that only stores hours loses them.

The formats a timestamp usually has to become

Copying the right instant is half the job; the other half is producing the shape the receiving system expects. The page prints 24 formats from the same instant, grouped by what they are for: six date and time strings, four Unix units, and fourteen legacy epochs. The 12-hour toggle rewrites the clock and the table without touching the underlying value.

Family Example for the same instant Typical reader
ISO 8601 (UTC) 2027-01-15T08:00:00.000Z JSON APIs, databases
ISO 8601 with offset 2027-01-15T10:00:00+02:00 logs, tickets
RFC 3339 2027-01-15T10:00:00+02:00 HTTP payloads
RFC 2822 Fri, 15 Jan 2027 10:00:00 +0200 email headers
HTTP-date Fri, 15 Jan 2027 08:00:00 GMT caching headers
SQL datetime 2027-01-15 10:00:00 MySQL, SQLite text columns

A custom pattern field takes any date-fns format string, and the result updates as the pattern is typed. That covers the local conventions that no standard names, such as a report that wants 15.01.2027 or a filename that needs 2027-01-15_10-00. The copy button next to the field takes the rendered string rather than the pattern, which avoids the usual mistake of pasting the format instead of the value.

Legacy epochs and their offset constants

Not every system counts from 1970. Windows counts 100-nanosecond ticks from 1601, .NET counts the same ticks from year 1, Apple's Cocoa frameworks count seconds from 2001 and WebKit counts microseconds from 1601. Excel stores days since 1899-12-30 and keeps a deliberate off-by-one for the phantom leap day of 1900. Each of these is a fixed offset from Unix time, and each is a common source of values that convert to a date centuries away.

The read-as selector accepts FILETIME, Excel serial and NTP input in the same field, so a value copied from a registry key or a spreadsheet does not need a separate tool. In the other direction the output block prints all of them at once, which is handy when a bug report contains a FILETIME and the fix has to be written in Unix seconds.

Format Counting from Value for 2027-01-15T08:00:00Z
FILETIME 1601-01-01, 100 ns ticks 134444736000000000
.NET DateTime ticks 0001-01-01, 100 ns ticks 639355968000000000
WebKit timestamp 1601-01-01, microseconds 13444473600000000
NTP timestamp 1900-01-01, seconds 4008988800
GPS week + seconds 1980-01-06, plus 18 s W2453 460818s
Apple Cocoa time 2001-01-01, seconds 821692800
TAI timestamp Unix seconds plus 37 1800000037
Julian Day days since 4713 BC 2461420.83333
Modified Julian Date Julian Day minus 2400000.5 61420.33333
Lilian date days since 1582-10-15 162261.33333
Excel serial days since 1899-12-30 46402.333333
Unix day days since 1970-01-01 20833
Unix hex seconds in base 16 6b49d200
Unix binary (32-bit) unsigned seconds 01101011010010011101001000000000

Two of these deserve a warning. The 32-bit binary view is unsigned and therefore only meaningful between 1901 and 2038; a date after the limit wraps around and prints a small number that looks valid. The NTP output is whole seconds, so a value that needs sub-second precision has to come from the microsecond or nanosecond row instead.

Calendar attributes, boundaries and the 2038 limit

A date alone is not always enough context. Reports ask for the ISO week, the quarter, the day of the year or the number of days since the epoch, and computing those by hand invites off-by-one errors around week 53 and around the first days of January, when the ISO week belongs to the previous year.

The converter prints the weekday, day of the year, ISO week in the 2027-W02 form, quarter, epoch age in days and a relative phrase such as in 2 months. It also prints the UTC boundaries of the containing day, ISO week, month and year as start and end instants, which is what a query needs when it filters a range and the range should be computed in UTC rather than in the reader's zone.

The Y2038 bar shows two numbers: the percentage of the signed 32-bit range already consumed and the days left before 2038-01-19T03:14:07Z. Neither number is a prediction of failure; it is a reminder that a field definition of int(11) has a deadline, and that a migration to a 64-bit column removes it. The page also accepts instants up to 8.64e15 milliseconds in either direction, roughly 273,790 years, because that is the range a JavaScript date can represent; anything beyond it is rejected rather than silently wrapped.

Batch conversion of a column of epochs

Logs rarely arrive one value at a time. The batch panel takes up to 2,000 lines, one value per line, with an optional label prefix such as request: 1800000000 or started=2027-01-15T08:00:00Z. Each line is parsed on its own: integers from nine to nineteen digits are treated as epochs and the unit is detected per line, while everything else goes through the date parser. A mixed column therefore works without preprocessing.

The result is a table with the original line number, the label, the parsed kind, Unix seconds, ISO UTC and the time in the selected zone, plus a note column that records the detected unit or the parse failure. Lines that cannot be parsed are marked as errors instead of being dropped, so the count at the top tells you whether the input was complete. Export writes CSV through a proper escaper or JSON with the same fields, which makes the output usable as a fixture or as an attachment to a report.

Two practical limits are worth knowing before pasting a large file. The panel keeps the first 2,000 lines and reports the rest as omitted, so a longer file has to be split. The date parser also resolves each line independently, which means a batch of wall-clock strings without offsets is interpreted in the zone selected on the page; if the strings carry their own offsets, those win.

FAQ

What is a Unix timestamp?

It is the number of whole seconds since 1970-01-01T00:00:00Z, ignoring leap seconds. The value 1800000000 is 2027-01-15T08:00:00Z.

How do I tell seconds from milliseconds?

Count the digits: ten is seconds, thirteen is milliseconds, sixteen is microseconds and nineteen is nanoseconds. The auto setting applies that rule and prints the detected unit.

Why does the date change when I pick another zone?

The instant stays the same, but the wall clock depends on the offset. The same timestamp reads 10:00 in Chisinau, 03:00 in New York and 17:00 in Tokyo.

What happens to a time inside a DST gap?

The converter resolves it forward and shows a hint. In Europe/Chisinau, 2027-03-28 03:30 does not exist, while 2027-10-31 03:30 happens twice.

Can I convert a whole column at once?

Yes, up to 2,000 lines in the batch panel, one value per line with an optional label, and the table exports as CSV or JSON.

Does the page send my timestamps anywhere?

No. Parsing, zone conversion and export run in the browser, so values from private logs stay on the device.

Zig Mandel
Zig Mandel

Lima, Peru · SO reputation 19945 · Badges: 5🥇33🥈39🥉 · SO member since 2013