57

Are there any extensions for Chrome that allow me to export all currently opened tabs as a text file, containing all the URLs of those tabs?

I don't necessarily need it to be a text file if there is another way that you can think of. My goal is to share the URLs with someone via email.

I'm currently using Session Manager to save my open tabs but it has no functionality to export them as described above.

Gaff
  • 18,569
  • 15
  • 57
  • 68
Wern Ancheta
  • 6,492
  • 26
  • 105
  • 147

10 Answers10

27

In macOS you can use AppleScript.

List the URL of each tab in the frontmost window:

osascript -e{'set text item delimiters to linefeed','tell app"google chrome"to url of tabs of window 1 as text'}

List the URL of each tab in all windows:

osascript -e{'set text item delimiters to linefeed','tell app"google chrome"to url of tabs of windows as text'}

List the URL and title of each tab in the frontmost window:

osascript -e{'set o to""','tell app"google chrome"','repeat with t in tabs of window 1','set o to o&url of t&" "&title of t&linefeed',end,end}|sed \$d

List the URL and title of each tab in all windows:

osascript -e{'set o to""','tell app"google chrome"','repeat with t in tabs of windows','set o to o&url of t&" "&title of t&linefeed',end,end}|sed \$d

nisetama
  • 1,019
  • 9
  • 6
  • 1
    Love being able to do this without installing an extension! This worked for me on Mojave _after_ checking the Google Chrome checkbox for iTerm in Security & Privacy -> Privacy -> Automation. You may need to do something similar if you get execution error -1743. – eebbesen Feb 27 '20 at 00:37
  • ...yes and it does it only for the currently active Chrome window! love it – Edoardo Jul 03 '20 at 06:56
  • This worked for me after a system restart (before restart it would just open 7 empty Chrome windows and exit with error code -600). Thank you! – akdom Sep 19 '22 at 20:39
  • Is there any way to extract the name of the tab group and the name of the window as well? – thegreatcoder Aug 26 '23 at 22:38
27

In Chrome/Chromium you don't need any external tools. These are the steps:

  1. right click on any tab
  2. click add all tabs to bookmarks
  3. then click save
  4. click 3 dots
  5. click Bookmarks -> Bookmark Manager
  6. click export bookmarks

It will generate html file with all your bookmarks including open tabs (the file can be imported in a different Google Chrome/Chromium profile).

EDIT:

in the latest chrome/chromium this feature changed place but it's even simpler to use:

  1. click on the main menu (meatball - 3 dots)
  2. click bookmarks
  3. click bookmark all tabs... where you can pick a directory

... rest is the same

jcubic
  • 2,833
  • 2
  • 23
  • 23
  • 5
    "bookmark all tabs" only bookmarks tabs in the current browser window. If you have multiple windows open you have to save them individually. – Andrew Sep 28 '20 at 03:01
  • @Andrew it's per user, each user have they own Chrome profile, so everything in Chrome browser, you do to single user and single window. – jcubic Sep 28 '20 at 11:25
  • 2
    the export is "per user" but "Bookmark all tabs" only applies to one window at a time. – Andrew Sep 28 '20 at 15:07
  • @Andrew and can you have same user on different windows have different bookmarks, I've never seen such a thing, AFAIK bookmarks are per user not per window. – jcubic Sep 28 '20 at 15:45
  • 2
    yeah they are per user. I'm saying if I have 10 browser windows open with 10 tabs in each, there is no easy way to bookmark all 100 tabs. that's all. – Andrew Sep 28 '20 at 19:22
  • @Andrew Ah sorry I didn't realize what the answer was about, the tabs are per window. Then yes it export your tabs per window. Why would it export from other window that is not active? – jcubic Sep 29 '20 at 06:39
  • 1
    https://superuser.com/a/877859/74576 is a really helpful version of this answer. – Ryan Oct 11 '20 at 18:10
  • 1
    @Ryan I think this is exactly the same, but with keyboard shortcut. – jcubic Oct 12 '20 at 19:40
18

Tab Snap allows you to copy all open tab links to the clipboard. Once copied, you can save it to a text file.

enter image description here

Sathyajith Bhat
  • 61,504
  • 38
  • 179
  • 264
12

TabsOutliner (a Chrome extension which displays all currently open tabs and windows) can export not only flat tab lists to a usable text format (as HTML by saving the TabsOutliner window through Ctrl-S, with options to also save to GoogleDoc or Evernote or some other programs by drag & drop), but the exported data additionally contains the relations between the tabs (what was opened from what) and also the notes and all other marks which accompany the tabs in TabsOutliner.

The screenshot below shows an example tabs list in TabsOutliner as well as an example of the data from the TO window is exported to a Google Doc (just by drag & dropping from the TabsOutliner interface it is possible to export all windows by one drag & drop gesture when dragging the root node).

tabs list in Tabs Outliner example of data from a window exported to Google Doc


Disclaimer - As it seems there are some restrictions when promoting your own work, please be aware that I am the developer of this extension.

ruffin
  • 1,825
  • 1
  • 14
  • 17
omnray
  • 729
  • 7
  • 8
  • 1
    How do you import the exported `Tabs Outliner.htm` file? – Raj Mar 19 '14 at 23:56
  • You can open the Tabs Outliner html file in Chrome and Ctrl-click the links to reopen your tabs. – Freek de Bruijn May 04 '15 at 11:12
  • Alternatively - the second level hierarchies from this file can be dragged back to the Tabs Outliner by mouse. Though i heard some bug reports that that this might not work on MAC... – omnray May 11 '15 at 19:17
  • @omnray, It seems like to import, we'd have to drag the Windows in one-by-one. This means that if I have 100 windows, I'd have to drag-and-drop 100 times. Is there no better way? – Pacerier Jun 08 '15 at 23:15
  • This extension doesn't seem to exist anymore. ‍♂️ – Muhamed Huseinbašić Apr 04 '21 at 05:05
  • @Muhamed It was temporary unvaible for few days - pretty common situation with all of the works published in Chrome Web Store. It's now accessible again. – omnray Apr 08 '21 at 04:12
6

Copy All Urls seem to be the most popular extension of those doing exclusively the copy/paste/export job (13,725 users at the time of writing).

yurkennis
  • 527
  • 1
  • 6
  • 18
5

I like TabCopy for this -- exports the list of open tabs to format of your choice, including Markdown. Will copy current window or all windows, can include Page titles, ignore pinned tabs. Nice interface.

TabCopy Example

1

I found Export Tabs plugin to be quite simple, intuitive and useful and it's one of those that just works!

P.S. I have no affiliations to this.

Greenonline
  • 2,235
  • 11
  • 24
  • 30
SydMK
  • 111
  • 3
1

You don't need any plugins or extensions...

You just bookmark all tabs, and open bookmark manager, then first click (highlight) one link from the folder where you saved those tabs, and then ctrl+A to select all. and then just ctrl+C and paste the links anywhere you want.

kspr9
  • 11
  • 1
1

If all you need are the domain - not the full url - simply copy Chromiums history: ctrl + h to open the history, copy the desired entries to a textfile.

I use this trick when I'm on different machines and don't have the time, patience or authority to install an extension.

Note that this doesn't work with full urls e. g. ChromeHistoryView in screenshot.

enter image description here

somethis
  • 141
  • 4
0

I created an extension Email All Tabs for that purpose - It let's you email the current tabs in your window. You can choose whether you just want the URL's or also the titles of each page. If a tab has a long URL, it will shorten it using goo.gl.

Ari
  • 243
  • 1
  • 3
  • 10