72

How can I view the number of open tabs in Chrome (desktop) without installing an app or extension?

On Chrome for iOS it's easy, just look in the top right for the number:

Tab count, Chrome (iOS)

I have seen this question posted before, but asking for app/extension recommendations. I would like a solution which does not require installation of third-party code.

Hennes
  • 64,768
  • 7
  • 111
  • 168
jsejcksn
  • 3,923
  • 3
  • 27
  • 34

7 Answers7

81

(Note: This answer was provided using Chrome version 45)

By navigating to chrome://inspect/#pages, one can view a list of all open pages (tabs):

Chrome DevTools — Pages, Chrome (desktop)

Each entry includes a link below it with the text "inspect". By performing a Find operation on the page (ctrl/cmd + F) for the string inspect, Chrome will produce the Find input box containing the total number of instances of the searched string, and, in this case, the total number of open pages/tabs in your browser!

Find input

jsejcksn
  • 3,923
  • 3
  • 27
  • 34
  • 1
    Also, it appears that it does not count pinned tabs, or the inspect tab itself. – Ryan Nov 11 '17 at 20:56
  • 2
    It *does* count the inspect tab iteself, actually, it counts it three times (the title contains "inspect", the url contains "inspect" and the inspect link). I would prefer @Yarin's answer instead, it counts correctly. – biolauri Oct 31 '18 at 15:01
  • 6
    It also list's only some tabs, if Chrome has been restarted with open tabs, see my comment at @Yarin's answer (https://superuser.com/questions/967064/how-to-get-tab-count-in-chrome-desktop-without-app-extension#comment2065046_1335969) for further info. To get a full list, tab into each open tab to trigger loading. – biolauri Oct 31 '18 at 15:05
  • 1
    It does not count "inactive" tabs. one would need to go, tab by tab, trigger a reload before using this method (might as well just count them manually) – Olivier Dulac Sep 23 '21 at 15:04
  • 2
    It shows only "Loaded" tabas, ones that are actually active. But chrome can have tabs, that have tab present, but content unloaded. Or it seems. I have 100+ tabs, but that page shows 20+ or so. – Bogdan Mart Sep 04 '22 at 08:56
  • 1
    As other commentators point out this is not a correct count! I have more than 300 tabs open and this gave me last week like 55, and this week (no changes in the browser in the meantime and no computer restart) it shows 43. – Yisroel Tech Sep 12 '22 at 13:56
34

While jsejcksn's answer led me in the right direction, it wasn't enough, since (on Chrome version 67) this page also contains embedded windows in pages, so the total count of inspect search results can be greater than the actual tab count.

The solution I found is the following:

  1. Go to chrome://inspect/#pages
  2. Run the following line of code in the javascript console:

    document.getElementById("pages-list").childElementCount
    

    The tabs count will be printed to the console.

Yarin
  • 449
  • 4
  • 3
  • 2
    This is also nice since it won't overcount by including any other strings that happen to have the word `inspect` in them. – davejagoda Sep 05 '18 at 20:54
  • 11
    As Chrome loads tabs on demand after restart (at least with a high number of open tabs), the inspect page doesn't list those (and only the one's already loaded). If you want to count all, then you have to tab into every single tab and the lists in the inspect page is getting updated. – biolauri Oct 31 '18 at 15:03
  • @biolauri I tried that now, restarted my computer and opened chrome, and I still get a high tab count, even though many tabs are barely loaded (naked html). (Chrome 70) – Yarin Dec 01 '18 at 07:55
  • 1
    I am after restart and I only see some of the tabs on the inspect list – MarianP Jun 13 '19 at 07:03
  • 1
    I see basically the same number (actually 2 less, guessing that's from this comment's observation: https://superuser.com/questions/967064/how-to-get-tab-count-in-chrome-desktop-without-app-extension#:~:text=It%20does%20count%20the%20inspect%20tab%20iteself%2C%20actually%2C%20it%20counts%20it%20three%20times%20(the%20title%20contains%20%22inspect%22%2C%20the%20url%20contains%20%22inspect%22%20and%20the%20inspect%20link).%20I%20would%20prefer%20%40Yarin%27s%20answer%20instead%2C%20it%20counts%20correctly.) – Kyle Baker Oct 30 '21 at 12:39
15

Haven't seen this solution mentioned yet, but it is by far the easiest (one-click) solution that works for me:

If you have chrome sync enabled, simply navigate to https://chrome.google.com/sync

It should give you the count of open tabs, among other counts (e.g. bookmarks, extensions, etc)

Protector one
  • 1,305
  • 3
  • 20
  • 29
tomosius
  • 251
  • 2
  • 4
  • I think this includes tabs on mobile as well (across all devices). – Kyle Baker Oct 30 '21 at 12:40
  • Yes, that is true, but only on "open" devices. As stated in Chrome's Account details, the count reflects the number of "tabs that are currently open in Chrome on one of your devices" Since I generally only have one active computer / laptop running, and I don't use Chrome on my mobile phone, then it is an accurate count for me. – Michael M Sep 21 '22 at 22:55
10

As noted on Chrome Tricks, to get a count of tabs in each window, right click on any tab and select Move Tab to Another Window.

The items in the flyout menu show the number of tabs in the other windows:

A screenshot showing the menu described above

Karl Horky
  • 518
  • 4
  • 7
7

Edit: I've created a simple browser extension out of my solution.


You could utilise an existing extension's background script (Manifest V2) or service worker (MV3) and run a chrome.tabs.query() with a catch-all condition, for example

await chrome.tabs.query({ windowType: 'normal' })

In order to access an extension's background script or service worker, you'll need to

  1. Navigate to chrome://extensions in a new tab
  2. Turn on "Developer mode" from top-right
  3. Find an installed extension and click on the "background script" or "service worker" link at the bottom of the extension's description.

A new developer tools window opens up where you can run the tabs query right in the Console.

enter image description here

Kano
  • 173
  • 1
  • 5
  • 1
    Thanks. You made my day. it shows 300 tabs, but accepted answer shows 33 tabs. Thank you so musch! Such underrated answer :-( Accept my huge thanks!!! – Bogdan Mart Sep 04 '22 at 08:59
  • correct code for 2022 year: `let yy=null;await chrome.tabs.query({ windowType: 'normal' },function(xx){yy=xx; console.log(xx)});` – Bogdan Mart Sep 04 '22 at 09:02
  • @BogdanMart none of that is necessary, you can just await the tabs query and it will print the result for you into the Console. – Kano Sep 08 '22 at 07:10
  • I don't know, It doesn't work for me in Chrome 104.0.5112. I gueuss it's old syntax. And frurehermore, it requires to pass callback. oherwise I'm getting error: `Uncaught TypeError: Error in invocation of tabs.query(object queryInfo, function callback): No matching signature.` and await don't work as well. – Bogdan Mart Sep 08 '22 at 16:51
  • 1
    FYI: I had to turn on notifications for chrome in the mac system preferences to get this to work. – dwj Oct 16 '22 at 18:56
  • Yeah sorry, didn't know another great visible way to prompt the count while keeping the code as lightweight as possible. – Kano Oct 19 '22 at 08:04
0

Just close the window and open Chrome again to load the tabs into history (if you have history enabled). You can then click on the three little dots in the top right, go to History and there will be the full number of tabs (including inactive tabs after a restart, so no need to reload the tabs to get an accurate number). Of course, you also get the option to open the window with all the tabs again if you have History enabled properly.

Works in Google Chrome version 98.0.4758.82 (official build) (64-bit)

ljlsr
  • 1
  • 2
0

Go to chrome://discards, and sort by Utility Rank descending. The highest Utility Rank is the number of tabs:

enter image description here

krisz
  • 111
  • 7