How do I export the Browsing History in Firefox?

I lost a load of open tabs in Firefox that I want to recover. The details are in the browsing history but it is not the most friendly area of Firefox to wade through. The Export option there actually exports bookmarks. I want to export my browsing history as a text file so I can search, dedup, etc in a text editor. I can not work out a way of exporting the browsing history so any suggestions much appreciated.

Firefox 3.5.5 Windows XP Pro


Solution 1:

Browsing history is stored in a file called places.sqlite in your profile folder. On Windows it is located in the randomly named .default folder found in this directory:

%APPDATA%\Mozilla\Firefox\Profiles

This file format is not easily edited in a text file, but you can use SQLite Database Browser (free and open source) to view the file.

Solution 2:

For modern era (it's March 2014 as I write this) Firefox users on Windows machines, you can give Nirsoft's Firefox History Viewer a try: http://www.nirsoft.net/utils/mozilla_history_view.html

Not sure if it can read the (very old and outdated) history.dat format, but it can filter, slice, dice, chop, puree, scramble, and otherwise do all kinds of fancy things (but it cannot make your coffee and serve it to you, sorry!) with the history data in the "places.sqlite" format, and then export it to several common formats ranging from text to html to csv to xml to whatever.