Turn Unix timestamps into dates, and dates into timestamps
Computers often store time as a single number: the seconds since midnight UTC on 1 January 1970, called Unix time or epoch time. It turns up in log files, databases, API responses, spreadsheets exported from apps, JSON Web Tokens and file metadata. The number 1700000000 means nothing at a glance; this converter shows it as 14 November 2023, 22:13:20 UTC, in your own time zone and any other, and works the other way too.
How to use it
- Paste a timestamp on the left. The converter works out whether it is in seconds, milliseconds, microseconds or nanoseconds from its length, and says which it assumed.
- Read the date in UTC, in your time zone, in ISO 8601 and RFC 2822 formats, how long ago or ahead it is, and in one extra time zone of your choice. Click Copy next to any line.
- To go the other way, pick a date and time on the right and the time zone it is in, and copy the timestamp in seconds or milliseconds.
- For a whole column, open "Convert a whole list", paste timestamps one per line, and copy the dates back into your spreadsheet.
Seconds, milliseconds and the rest
Unix time is normally in seconds; a timestamp for today has 10 digits. JavaScript and many web APIs use milliseconds (13 digits); some databases and languages use microseconds (16 digits) or nanoseconds (19 digits). Mixing them up gives dates in 1970 or tens of thousands of years from now, which is the most common reason a converted date looks wrong. The converter decides by size: anything up to 11 digits is seconds, and so on. If you need a different reading, the unit line shows what it chose.
Good to know
- Unix time is always UTC. The same number is the same moment everywhere; only how it is shown changes with the time zone. Daylight saving changes are handled by your browser's time zone data.
- Leap seconds are not counted in Unix time, which is why it can be converted with plain arithmetic.
- The year 2038 problem: older systems store the seconds in a signed 32-bit number, which runs out at 2147483647, on 19 January 2038 at 03:14:07 UTC. Modern systems use 64 bits.
- Negative timestamps are dates before 1970 and work here too.
- Nothing is sent or stored. Conversions run in this page.
How this tool was tested
Before publishing, I ran 30 automated checks on the finished page in Microsoft Edge, which is built on Chromium like Chrome. Last full run: 15 November 2026.
- Known timestamps: 0 is 1 January 1970, 1700000000 is 14 November 2023 at 22:13:20 UTC, -86400 is the day before 1970, and 2147483647 is 19 January 2038 at 03:14:07 UTC, the 32-bit limit.
- Units: the same moment written in seconds, milliseconds, microseconds and nanoseconds is recognised as each and gives the same date.
- Time zones: 9:30 in New York is 14:30 UTC in winter and 13:30 in summer; Tokyo and Kolkata (half-hour offset) are right; and London on the day after the clocks change. 600 random moments in six time zones, shown as local time and read back, give the same timestamp.
- Using the tool: the live clock, the unit line, the extra time zone, a list with blank and bad lines, bad input and the Copy buttons.
What the tests did not cover: Safari and Firefox were not tested. Time zone rules come from the browser, so very old dates or future rule changes depend on its data. Something not working? Tell me on the contact page.
FAQ
How do I get the current Unix time?
It is shown at the top of the page and updates every second. In code: Math.floor(Date.now() / 1000) in JavaScript, time.time() in Python, or date +%s in a terminal.
How do I convert a timestamp in Excel?
For seconds: =A1/86400+DATE(1970,1,1), then format the cell as a date and time. Divide by 86400000 instead for milliseconds. The result is in UTC.
Why is my date off by some hours?
The timestamp is UTC and you are probably looking at local time, or the other way round. Compare the UTC and local lines.