Unix Timestamp Converter: Epoch Time to Date and Back
By FindMySum · Last reviewed
A Unix timestamp converter turns epoch time, the count of seconds since 1 January 1970 that computers use to store dates, into a readable date and time, and turns a date back into a timestamp. Paste a timestamp from a log file, a database or an API response and this converter shows it in UTC and in any time zone, in the common text formats and as an Excel serial date. It detects whether the number is in seconds, milliseconds, microseconds or nanoseconds from its length.
What Unix time counts
Unix time (also called epoch time or POSIX time) is the number of seconds that have passed since 00:00:00 UTC on Thursday 1 January 1970, the "epoch". It is defined by the POSIX standard so that every day is exactly 86,400 seconds: leap seconds are not counted. That makes date arithmetic simple: the day number is the timestamp divided by 86,400, and the remainder is the time of day in UTC.
Because the count is the same everywhere at a given instant, it doesn't depend on time zones or daylight saving. Converting to a local time means adding the zone's offset from UTC on that date: −5 hours for Toronto in winter, −4 in summer, +5:30 for India.
Worked example
The converter opens with 1767225600:
- 1,767,225,600 ÷ 86,400 = 20,454 days exactly, so the time is 00:00:00 UTC.
- Day 20,454 after 1 January 1970 is 1 January 2026. In ISO 8601:
2026-01-01T00:00:00Z. - Toronto was on Eastern Standard Time (UTC−5), so locally it was 19:00 on Wednesday 31 December 2025,
2025-12-31T19:00:00-05:00. - In Excel's 1900 date system, that local time is serial 46022.7917: 46,022 days after 30 December 1899, plus 19 hours as 0.7917 of a day.
The reverse direction works the same way. 9:30 am on 1 July 2026 in Vancouver is UTC−7 (Pacific Daylight Time), so it is 16:30 UTC, timestamp 1782923400.
Seconds, milliseconds, microseconds, nanoseconds
| Unit | Digits today | Example for 2026-01-01T00:00:00Z | Typical source |
|---|---|---|---|
| Seconds | 10 | 1767225600 | Unix date +%s, most APIs, JWT tokens |
| Milliseconds | 13 | 1767225600000 | JavaScript Date.now(), Java |
| Microseconds | 16 | 1767225600000000 | Python, PostgreSQL |
| Nanoseconds | 19 | 1767225600000000000 | Go, some databases and tracing tools |
Auto-detect counts the digits: up to 11 digits is read as seconds, 12 to 14 as milliseconds, 15 to 17 as microseconds and more as nanoseconds. That works for dates from 1973 to 5138; for a timestamp far in the past, choose the unit. Nanosecond values are too large for an ordinary floating-point number to hold exactly, so the converter keeps them as whole integers and shows every digit.
Output formats
- ISO 8601 / RFC 3339:
2026-01-01T00:00:00Z, or with an offset,2025-12-31T19:00:00-05:00. The standard for APIs, JSON and databases. - RFC 2822:
Wed, 31 Dec 2025 19:00:00 -0500, the format of email Date headers. - HTTP date:
Thu, 01 Jan 2026 00:00:00 GMT, always in GMT, used in Last-Modified and Expires headers. - Excel serial: days since the start of Excel's calendar, with the time as a fraction of a day.
Excel's two date systems
Excel stores dates as serial numbers. In the default 1900 date system, serial 1 is 1 January 1900, but Excel also
counts a 29 February 1900 that never happened (1900 wasn't a leap year), a bug kept for compatibility with Lotus 1-2-3.
So from 1 March 1900 onwards a serial is the number of days since 30 December 1899, and the Unix epoch is serial
25569. Older Mac workbooks use the 1904 date system, which starts on 1 January 1904 and puts the epoch at 24107. The
advanced setting switches between them. In a spreadsheet, =A1/86400+25569 turns a timestamp in seconds into an
Excel date in UTC.
The Year 2038 problem
A signed 32-bit integer can hold up to 2,147,483,647, which as a Unix timestamp is 03:14:07 UTC on 19 January 2038. One second later, a 32-bit counter overflows and jumps back to December 1901. Modern systems store time in 64 bits, which won't run out for about 292 billion years, but embedded devices, old file formats and database columns typed as 32-bit integers can still fail. The converter warns when a timestamp is beyond the 32-bit limit.
Clock changes
When you convert a local date and time to a timestamp, two moments each year need care. On the night clocks spring forward, an hour of local time doesn't exist (2:30 am in most of Canada and the US); the converter reads it as the time after the change and says so. When clocks fall back, an hour happens twice, and the converter takes the first (daylight time) one. Offsets come from the IANA time zone database built into your browser, the same data your operating system uses.
More questions
Why does my timestamp show the wrong hour?
Usually because it is being shown in the wrong time zone. A Unix timestamp is always UTC; 1767225600 is midnight UTC on 1 January 2026 but 7 pm on 31 December in Toronto. Choose your zone to see the local time, and check whether the system that produced the timestamp wrote a local time as if it were UTC.
Can a Unix timestamp be negative?
Yes: negative timestamps are moments before 1 January 1970. −86400 is midnight UTC on 31 December 1969. Most modern languages and databases handle them, though some older systems and file formats don't.
What epoch do other systems use?
Several. Windows FILETIME counts 100-nanosecond intervals since 1601, Excel counts days since 1900 (or 1904), GPS time counts from 6 January 1980 and NTP from 1900. Unix time is the most common on the web, in databases and in log files.
How precise is a timestamp in milliseconds?
To a thousandth of a second, which is what JavaScript, Java and many logging tools use. Microseconds (Python, PostgreSQL) and nanoseconds (Go, some databases) are more precise; the converter keeps every digit by doing the arithmetic with whole integers rather than floating-point numbers.
Does a timestamp change with daylight saving time?
No. The timestamp counts seconds in UTC, which has no daylight saving. Only the local time you convert it to changes: the same offset-free number shows as EST in winter and EDT in summer in Toronto.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.