Firefox: save highlighted text to a local file

If you want to preserve information that you have come across on the Internet you have multiple options to do just that. You can save the web page in various formats including as a HTML file, copy the contents that you are interested in to the clipboard and from there to a document on your computer, or bookmark the page. All of the methods have their distinct advantages and disadvantages. Bookmarking may be the quickest option but it does not guarantee that the information will still be available when you access the web page in the future.

Highlighted Text To File is a Firefox add-on that to save highlighted textual contents in the web browser to a text file on the local system. To do that, simply highlight text that you want to save on a web page, right-click afterwards on the page, and select the Save text to file option from the context menu. A preferences window is displayed the first time you use the feature.

Here you can make the following modifications to the output:

  • Configure the output file name including a prefix and whether the date or time should be added to the file name automatically.
  • Configure the directory the file will be saved in.  The default directory if left blank is the user profile folder of the Firefox installation.
  • Whether date, time, url or a separator are written to the file as well.
  • Whether you want to create a new file every time you save text, or append contents to one existing file.

save highlighted text

You can bypass the preferences window if you uncheck the "open preferences dialog when Save Text To File is clicked" option in the dialog  which speeds up the saving of the text. When you save text, a notification is displayed at the top of the browser window to inform you about it. The text is encoded in UTF-8 format to ensure that international characters are saved correctly.

The extension can be quite useful if you regularly save text to files when you are browsing the Internet. The option to bypass the preferences window makes this one of the fastest options to save highlighted text to a local file.

Update: The add-on has been renamed. It is now called Save Text to File.

Please share this article

Facebooktwittergoogle_plusredditlinkedinmail


Filed under:


Responses to Firefox: save highlighted text to a local file

  1. Crodol October 31, 2012 at 12:28 am #

    I was looking for something like this and I always struggled a bit with the ScrapBook add-on. Thanks Martin!

  2. mage October 31, 2012 at 6:36 pm #

    Is there an addon like this that saves the formatting of the selected text when it saves it to a file?

    • Martin Brinkmann October 31, 2012 at 7:35 pm #

      I'm not aware of any add-ons that can do that. Can anyone else chime in?

      • Ken Saunders November 1, 2012 at 8:53 am #

        I don't know of any add-ons either, but, you can highlight text > right click > View Selection Source, copy and save that.
        It isn't the quickest solution, but it does work.

        Example:
        Highlighted Text To File is a Firefox add-on that to save highlighted textual contents in the web browser to a text file on the local system.

        There are several note type taking extensions. I've gone through a bunch of them over the years but now I've settled with QuickFox Notes.
        https://addons.mozilla.org/en-US/firefox/addon/quickfox-notes/?src=search

        It has many great features, some add-ons available for it, helpful export functions, can be opened/pinned in a tab, and currently has 32K+ users.

  3. Frank D October 31, 2012 at 10:01 pm #

    I've installed it (FF 15.01) but when I select text, there is no icon in either the bar at the top or in the status bar, and there is no "Highlighted text to file" option in the Tools or right-click menu, so there's no way to save the highlighted text. What am I doing wrong?

    • Frank D October 31, 2012 at 10:03 pm #

      OK, I now found the option in the right-click menu as "Save text to file." Thanks anyway.

      • Frank D October 31, 2012 at 10:08 pm #

        It's a nice app. I wish it would preserve the URLs in the links that it saves as text.

      • Martin Brinkmann October 31, 2012 at 10:46 pm #

        It is saving the url in the the text file by default.

  4. Frank D October 31, 2012 at 11:11 pm #

    We may have a difference in terms. Here is an example of how the app saves links in the text file:
    ---------------------------------------------------
    Date stamp:31-10-2012
    Time stamp:17-8-32
    http://www.ghacks.net/2012/10/30/firefox-save-highlighted-text-to-a-local-file/#comment-1599066

    Author: Martin Brinkmann, Tuesday October 30, 2012 -
    Tags:Firefox, firefox add-ons, text
    Categories: Browsing, Firefox
    You are here: Home » Browsing » Firefox: save highlighted text to a local file
    Previous Post: Mozilla wants to make bookmarks more usable

    Next Post: The Windows 8 Kindle Application

    Note that the URLs behind the links is lost. So there isn't much point in having the links in the text file, since they can't be used to find the referenced websites.

  5. Frank D November 1, 2012 at 8:47 pm #

    After much Googling and trying (and failing) to find a single addon or program that would "do it all" I can only suggest using the following work-around. After using the "Highlighted Text to File" addon and thereby creating the plain text file as described above, use the Firefox "Multi Links" addon to highlight all of the same text and then paste the results, which will contain all of the text of the links *with links* into the same file, at the end. Then you will have it all, with the expenditure of about twice the work.

    I hope there will be more suggested addons or programs or workarounds as a result of this article that will do it all in one go-around. That would be a truly valuable item.

  6. bobbyrne01 December 3, 2012 at 1:03 pm #

    Hey Martin
    Appreciate the blog entry for the addon!!
    Could you please update the URL for this addon in the description as I've changed the name and location from 'Highlighted Text to File' -> 'Save Text to File'
    Heres the new URL ..
    https://addons.mozilla.org/en-US/firefox/addon/save-text-to-file/

  7. rpwheeler August 28, 2013 at 11:54 pm #

    Alas, it seems that this doesn't work for unicode text, and most of texts I want to save are unicode.

Leave a Reply