Automatically sort Firefox bookmarks

Firefox bookmarks are not sorted automatically, which may be fine as long as you do not add more than a dozen or so bookmarks to a folder. When the count rises to hundreds, you may however appreciate an option to sort bookmarks in the browser to improve the accessibility.
Bookmarks by default are unsorted in Firefox, which means that new bookmarks are simply added to the end of a folder. Back in 2007 I explained how you can change the sort order of bookmarks in Firefox manually.
Update: Mozilla seems to have pulled the option to define the sort order of bookmarks using the preference mentioned below. You can still sort bookmarks manually in Firefox using Views > Sort in the bookmarks manager. End
For that, you need to load about:config in the browser and edit - or create if it is not existing - the preference browser.bookmarks.sort.direction there. The preference is a string value, and options include setting it to natural to sort bookmarks alphabetically from A to Z, or ascending to sort them from Z to A.
The Firefox add-on Auto-Sort Bookmarks handles the sorting automatically. Once you have installed the extension in the browser you will notice that all bookmarks in Firefox are sorted alphabetically from A to Z. The extension puts folders at the top and bookmarks below the folders by default.
You will also notice that you can't change the order by dragging and dropping bookmarks into other locations. While you can still move them into other folders, you can't change a bookmark's position in its current folder anymore.
Update: The most recent version of AutoSort of Firefox ships with options included. You can access them from the add-on manager by clicking on options next to it.
There you can define where it is displayed in Firefox, how bookmarks should be sorted, and how folders and bookmarks should be sorted.
One semi-automated option that you have is to open the Bookmarks Manager using the shortcut Ctrl-Shift-b. There you can right-click on any folder and select the Sort by name option of the context menu to sort it by name.
The extension has no options dialog. What you can use however are about:config parameters to configure some of its functionality. The following parameters are added to Firefox when you install the extension:
- extensions.sortbookmarks.sortbar - set to true by default. Defines whether bookmarks in the bookmarks bar will be sorted as well.
- extensions.sortbookmarks.foldersbefore - set to true by default. Puts folders on top of bookmarks in the same structure.
- extensions.sortbookmarks.autosort - set to true by default. Defines whether bookmarks are automatically sorted or not.
If you are working with lots of bookmarks, you may want to use the manual or automatic sorting options available in the web browser to put order into chaos. Bookmarks stay sorted alphabetically even if you remove the extension from the browser again.


The browser.bookmarks.sort.direction doens’t seem to be availabel anymore in Firefox. Is there any other way to auto sort the bookmarks without any plugins?
I’ve just noticed that there is an updated version (1.2, still in sandbox) that now handles the separators perfectly well. This being, the add-on appears handy, be it in automatic mode or not. I’ve tested both, was very fast and accurate.
Hello.
I am the author of this extension and I am glad to see this article describing it.
I would like to say that there actually is an options dialog.
You don’t have to go in about:config to change the options.
You just have to go in the Firefox Add-ons manager (Firefox menu -> Add-ons -> Extensions tab).
Then, next to “Auto-Sort Bookmarks”, there is a “Preferences” button.
By clicking on it, you get access to the options dialog.
If you have any suggestion, please tell it to me.
same as above?
I always add bookmarks by dragging and dropping them where I want them. You can always just right-click any bookmark folder and select “Sort by Name”.
True. That’s what I’ve always done and will keep on doing. Moreover having latest bookmarks added vertically had advantages (though the add-on offers, even if my means of about:config setting only) to avoid automatic sorting. Lastly, if a user is not aware of the about:config related settings as pointed out by Martin, he/she will be lacking half the semi-potential of this extension, which leads to little.
One of the keen things in Firefox bookmarks management is the possibility offered with the “separation lines” (don’t know the right word in English) which allows to have intra-folder sorting.
I am wondering if this add-on respects sorting within the separations or not, because if it does not, and with no backup, I’m off for eternity in grouping back my items !
Hello.
I am the author of this extension.
The next version of my add-on will support sorting bookmarks between separators.
You will have to wait a few hours/days to get this feature in the version 1.2.
Just read a review on AMO, “Ignores the separator […]”
I should have digged before posting !
Martin, is there something like this ” browser.bookmarks.sort.direction” but for sorting bookmarks by location?
TO SORT FIREFOX BOOKMARKS “BY NAME” JUST CLICK IN BOOKMARKS MENU —-> SHOW ALL BOOKMARKS AND FOLLOW:
1. Select ALL (CTRL+A) your bookmarks entries
2. Move them to “Unsorted Bookmarks” folder
3. Click in the the upper TAB “Name”
4. Select ALL (CTRL+A) your bookmarks entries
5. Move them to “Bookmarks Menu”
6. Close Window
Martin, unfortunately it’s not permanent, but then again I may need to sort my bookmarks in a different way each time I access them, depending on what I want to do. A few mouse clicks isn’t that much of an imposition I suppose.
Thanks for the article. It has prompted me to do something about the accumulating unsorted bookmarks I have sitting in my Unsorted Bookmarks. If I was organised I would, when initially bookmarking a site, do the second click on the star and then sort into the requisite folder and label it with the appropriate tags, but of course one never is that sensible ….. sigh … so I have a few to go through
Michael
Michael, I also have hundreds of bookmarks in there and have not yet found the time to sort the list.
I’m not aware of that, sorry.
Martin,
To sort Bookmarks by Location use the following steps
Bookmarks ….. Show all Bookmarks
Unsorted Bookmarks
Ctrl A …. to select all the Bookmarks
Click on Location
This will sort the Bookmarks alphabetically according to their website. This will allow you to grab bookmarks from the same website and drag them into folders as required The other columns can also be sorted as required. The advantage of doing the Ctrl A is that it gives you the number of bookmarks you have to sort you don’t actually need it to run the sort on the columns.
This doesn’t have the advantage of sorting your bookmarks automatically, but its only a couple of clicks and there are various ways that I may need to sort them e.g. all reviews for instance (Name) or all from the Guardian website (Location) or by tags (which can be added by right clicking the head of the chart and looking at the columns you want to display)
Regards
Michael
Michael thanks for that. Is that permanent then?