77

If I have a Firefox window open that contains 10 tabs, is there a way in Firefox or by a plug-in to get the URLs of those 10 tabs as a text file or some other format?

Right now if I want to do this I need to copy the URL of tab A, paste it somewhere, move to tab B, and repeat. I could also bookmark all the tabs into a folder and export that, but that seems like such a hassle.

If there is no such method, could someone point me to some documents that describe the basics of writing a Firefox plug-in. I am willing to write this myself if there is no "standard" way.

17 Answers 17

77

Go to Tools > Options.

In the General tab look for the Use Current Pages button in the Startup section. When you click on the Use Current Pages button, all the URLs of the pages open in different tabs are copied to the Home Page text box with a pipe delimiter. Copy the text to get all the URLs.

The keyboard shortcut to simulate clicking on the Use Current Pages button is Alt+T+O+C (tested in Firefox 14)

  • 8
    This action can also be easily reversed, just hit ctrl-z to undo the change and whatever was in the textbox previously will be restored. Now you don't have to install a plugin. – kurtzbot Jun 17 '13 at 22:38
  • 3
    This is not working for me when trying to save a huge session of 300+ tabs in about 7 Windows. There seems to be a limit to this trick in terms of tab numbers, beware – user78017 Feb 18 '14 at 12:31
  • 2
    T.O.C. = Table of Contents! Neat! Works in Firefox 17.0.9 on Windows. – isomorphismes Mar 3 '14 at 12:46
  • 3
    Nice answer. Alt+E+N+C for any other Linux users. :) – Ash May 17 '14 at 2:51
  • 3
    This method works wonderfully, but you'll have to do it for each window. It also doesn't grab pinned tabs, so you'll have to do those separately as well. – Tustin2121 Sep 4 '15 at 16:04
24

I found an add-on called Send Tab URLs that copies the URLs of all open tabs with the intention of sending them by email to someone. This add-on also allows the target of the URLs to be the clipboard as well as email so this solves my problem 100%.

https://addons.mozilla.org/en-US/firefox/addon/4437

8

No need to export anything.

Just save all the tabs in a folder (you already know how to do that), right click on folder, copy. Open notepad, paste. Voila. All URL's of bookmarks in that folder.

  • 1
    Yes, that does work, but I was thinking more along the lines of having an option in a plug-in menu or the context menu that would put the URLs into my clipboard. Then I won't have to create, view, and delete intermediate bookmark folders. – hekevintran Jan 17 '10 at 2:36
  • Sorry, don't know of any plugin which would do that. It is a rather unusual request (I still can't see why do you need something like that...). Anyways, you got one way now ... this one takes about 6 clicks ... the fastest I know, sorry. – Rook Jan 17 '10 at 2:53
  • Right click on tab, bookmark all tabs, ok, right click on dir, copy ... url's are in clipboard ... 5 clicks. – Rook Jan 17 '10 at 2:53
  • Yeah you are right about it's unusualness. I think I'm going to look up references on writing Firefox plug-ins. I want it to be 2 clicks dammit! Thanks though. – hekevintran Jan 17 '10 at 2:59
  • 2
    This is not so unusal a problem. I was looking for the very same thing. I have 50+ tabs openon my work pc from things I find in my lunch break I either want to remember or come back and read in depth later. i want to export and store so I can open at home and browse at leisure. +1 for question – ianfuture Mar 12 '10 at 12:42
5

An open source plugin to do the job: Copy as Markdown. Added benefits: works on both Firefox and Chrome, and it exports with Markdown formatting.

Copy as Markdown for Chrome & Firefox

Do you often type Markdown code manually for a link or image, or even all tabs in a window, and feel tired? Copy as Markdown can help you!

Features

Copy as Markdown is a browser extension helps you copy the following things as Markdown to your system clipboard:

  • Current Tab as Link
  • A Link in the Page
  • An Image in the Page
  • An Image that is wrapped with a Link
  • All Tabs as a List of Links
  • Highlighted Tabs as a List of Links

Excerpt from the project's readme.

It can be added to Firefox from its Add-Ons listing.

  • Thanks. I had written my own bookmarklet to do this for the current tab but this extension provides more useful features. – Anthony Geoghegan Mar 20 at 15:23
3

You might want to consider a similar add-on with different options, CopyAllURLs; especially if mailing is not a priority. -Isn't that 2 clicks ? It's in the context menu. [That linked page also lists 'alternative solutions']

  • 2
    Sheesh, this add-on is now out of date.....what solution will even work for this problem? – user78017 Feb 18 '14 at 12:34
  • you can download the latest version from the homepage. – DJCrashdummy Nov 18 '15 at 8:02
  • 1
    @DJCrashdummy that is generally a bad idea.... addons on the site get checked for stability, malware etc – Wilf Jan 25 '16 at 1:41
2

I'm using Copy Urls Expert. It adds a menu item when I right-click on a tab. There are options to copy all URLs in the current window, in the current tab group, or all tabs; and also to open URLs from the clipboard. The URLs are just separated by newlines. I appreciated the simplicity of this approach, as compared to alternatives like Send Tab URLs which includes the title of each page along with the URL. "Copy Urls Expert" is a rewrite of CopyAllURLs, which is defunct.

  • 1
    I'm also a fan of this, but Firefox Quantum ... reeee. Copy Urls Expert is one of the reasons I didn't update, yet. With the script in my answer that is solved for me, but I also need a replacement for Menu Wizard and Tab Mix Plus. – mxmlnkn Feb 24 '18 at 13:48
  • @mxmlnkn Yeah I just downgraded by installing a Firefox ESR binary. So I can type in this box with "It's All Text!". – Metamorphic Feb 25 '18 at 4:41
2
#Test in Firefox 5.0
$sessionStoreFile = "$env:APPDATA\Mozilla\Firefox\Profiles\*.default\sessionstore-backups\recovery.js"
$sessionStoreFileExists = Test-Path $sessionStoreFile
If($sessionStoreFileExists -eq $False) {
    #Test in Firefox 2.0, 3.0 and 4.0
    $sessionStoreFile = "$env:APPDATA\Mozilla\Firefox\Profiles\*.default\sessionstore.js"
}
(Get-Content -Encoding UTF8 -Raw -Path $sessionStoreFile).Trim('()') | ConvertFrom-Json |
Select -Expand Windows | Select -Expand Tabs | 
Where { !$_.hidden } | ForEach { @($_.Entries)[-1] } | 
Select Url, Title | Export-Csv -Path $CsvFile  -Encoding UTF8  -NoTypeInformation   

You can download detail SQL script from how to export all URLs of Firefox tabs at once(PowerShell)

2

From the comment by @Rook:

  • Right click on any tab

  • Chooseookmark all tabs

  • Right click on the new folder

  • Choose "copy"

Now the URLs are in clipboard.

  • Some notes & hints: (1) When you choose ”bookmark all tabs“, Firefox will open a new window asking you to define the name and the location of the folder to be created. (2) The URLs in the clipboard will be separated by newlines. The first line will contains the previously defined folder name. (3) about ”right-clicking on the new folder“: You can right-click not only in the ”Library“ (Ctrl+Shift+O), but also in the Bookmarks Toolbar (given you created it there), the Bookmarks Sidebar (Ctrl+B) or even the drop-down menu of the menu bar. – myrdd Oct 31 '18 at 15:11
  • @ aparente001: PS: I suppose you are referring to this comment by Rook. PPS: you've got a typo in ”Chooseookmark“ ;) – myrdd Oct 31 '18 at 15:14
1

I have used URL Lister for a couple of occasions. It is a simple addon that adds an option in "Tools". It then displays all open tabs' URL's in an editable text area.

It allows to export the list (by copying it to the clipboard) as plain text, HTML anchors or as a bulleted list.

It looks (by visual comparison of the available screenshots) similar to the beforementioned Send Tab URLs, with the differences being the lack of e-mail support and with the existence of the editable text area.

enter image description here

  • 1
    In contrast to Send Tab Urls, URL Lister doesn't work with Firefox 56. – maxschlepzig Nov 30 '17 at 9:51
1

As the second choice you mentioned putting the links into a text file. That method allows you to create documentation for research, and to email the links with titles, and descriptions (or other meta data), creating your own choices of what you want to copy and how you want it formatted. You can use Multiple Tab Handler (Firefox addon). I will just show what I use for copying into email, as I think creating an unordered list of links with buried urls in hypertext would not show up well here. The first two pages did not have descriptions, so I threw in one of my own. If emailing I might manually boldface the titles, and remove the "::" when there is no description.

Tabbed Browsing in Firefox :: Tabbed browsing in Firefox lets you load multiple web pages into separate tabs within the same browser window

Using MTH works well for creating documentation in Evernote, useful if you work on multiple systems or want your notes available anywhere. To help you with some examples of setting up MTH with a variety of choices see http://dmcritchie.mvps.org/firefox/multiple_tab_handler.txt

  • I object to edit done to the above, which is well intended, but destroys the content. MTH does not generate rich text format, so it cannot generate what is shown above. For something similar to the above one would have to use a different set of output and put that output through an online editor before pasting into an email. The example included a link to this very question so that one can see specifically what might be generated, plus two more links (still included) that not only serve to show in the example but as links to additional content of interest. Severe limitations on answers. – dmcritchie Nov 19 '15 at 18:02
  • Answer is supposed to include @djcrashdummy, -at-Hennes, and -at-duDE. At the time I did not have enough points to post nice links which would only have applied to the first list for Multiple Tab Handler within the large paragraph. And now I lack (a few thousand) points to be able to reverse an incorrect edit. – dmcritchie Nov 19 '15 at 18:15
1

Give a try to Export Tabs URLs (Firefox 48+)

It lets you either copy the current opened URLs list (optionally including their title) to clipboard or export it to a timestamped file.

1

This is not an addon, but for my own convenience I wrote a bash function if you are not afraid of the command line and if you are using Linux:

getOpenTabs(){
    local profile=$( sed -n -r '/^Path=/,/^Default=1/{ s|^Path=(.*)|\1|p; }' 
        "$HOME/.mozilla/firefox/profiles.ini" )
    # https://github.com/avih/dejsonlz4/blob/master/src/dejsonlz4.c
    dejsonlz4 "$HOME/.mozilla/firefox/$profile/sessionstore-backups/recovery.jsonlz4" |
        jq -c '.windows[].tabs[].entries[-1].url' |
        sed 's|^"||; s|"$||;' |
        xclip -selection c
}

On calling this function with getOpenTabs it reads the current session backup from the default profile folder extracts it using dejsonlz4, which you need to install for this function, and saves the links to the clipboard. Packages needed (besides dejsonlz4): jq, sed, xclip

0

A good way to export all opened tabs from FIREFOX is "CTRL + SHIFT +D" or ALT + B and then Bookmark all tabs and save as folder bookmark in Bookmark Manager --> then export as HTML

  • Bookmark all tabs??? What about the existing bookmarks? – Peter Mortensen Sep 25 '17 at 17:43
0

For Firefox 57 (Quantum), the following Plugin seems to have similiar functionality to "Send Tab URLs" but honestly isnt as clean with the URL and Title:

https://addons.mozilla.org/en-us/firefox/addon/copy-as-markdown/

But it works. I hope the author of "Send Tab URLs" updates his plugin as WebExtensions.

-1

CLICK the "ICON" and drag to desktop. (The quickest way :) enter image description here

-1

Use "Tab Groups" you can export/import all your tabs easily as a bookmarks

  • 2
    While this may answer the question, it would be a better answer if you could provide some explanation why it does so. For example, a brief explanation of what tab groups are, and how to export them. – DavidPostill Apr 7 '17 at 8:03
-3

follow up to tazo's suggestion:

drag the "icon" (earth or lock or whatever) onto a Word doc. the URL appears at whatever point the cursor was left at.

this isn't a good solution for the original question, as you still have to go to each tab, but at least it's slightly faster than right-clicking in the address bar, copying, and then pasting in a document. it might also be a quick shortcut for those times when you just need to include the URL from a tab with some other text.

note: the first time i tried this, it appeared in the Word doc as different text. the text was a hyperlink, and when i opened to edit the hyperlink, the URL it pointed to was the tab i'd tried to drag over. i don't know where that text came from. my guess is it might have been the last bit of text i'd copied and it was sitting on the clipboard.

note2: this didn't work for Notepad.

note3: CopyAllURLs and URL Lister are not available for version 42.0 (or, as of sometime in 2014). Copy Links seems to still be an option. https://addons.mozilla.org/en-US/firefox/addon/copy-links/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.