The fastest way to close a tab is a keyboard shortcut, not your mouse

You can close the tab you're looking at right now by pressing Ctrl+W on Windows or Command+W on Mac. That's the single fastest method across every major browser. If you want to close all tabs at once, use Ctrl+Shift+W (Windows) or Command+Shift+W (Mac) to shut down the entire browser window — this closes every tab in one action.

These shortcuts work in Chrome, Firefox, Safari, and Edge. They're built into the browser itself, so you don't need to install anything or change any settings. Once you know them, you'll close tabs faster than reaching for your mouse.

Key Takeaways

  • Ctrl+W (Windows) or Command+W (Mac) closes the current tab instantly.
  • Ctrl+Shift+W (Windows) or Command+Shift+W (Mac) closes the entire browser window and all its tabs at once.
  • These shortcuts work the same way in Chrome, Firefox, Safari, and Edge without any setup.
  • You can undo a closed tab by pressing Ctrl+Shift+T (Windows) or Command+Shift+T (Mac) immediately after closing it.
  • Keyboard shortcuts are faster than using your mouse because your hands stay on the keyboard while you work.

Close one tab at a time with Ctrl+W or Command+W

Press Ctrl+W if you're on Windows, or Command+W if you're on Mac. The tab you're currently viewing closes immediately. If you have multiple tabs open, the browser moves you to the next tab automatically — usually the one to the right of the tab you just closed.

This works even if the tab is frozen or not responding. You don't have to wait for the page to load or react. The tab closes the moment you press the keys, regardless of what's happening on the page.

You can press this shortcut as many times as you want in a row to close multiple tabs one after another. Each press closes the current tab and moves you to the next one, so you can rapidly clear out a group of tabs without pausing between each one.

Close all tabs and the browser window with Ctrl+Shift+W

If you want to shut down your entire browser session at once, press Ctrl+Shift+W on Windows or Command+Shift+W on Mac. This closes every tab you have open and exits the browser completely in a single action.

Use this when you're done browsing for the day and don't want to close tabs one by one. The browser will ask you to confirm if you have unsaved form data or downloads in progress, so you won't lose work by accident.

This shortcut is also useful if you want to start fresh with a clean browser session. All your tabs close, and when you reopen the browser, it starts with a blank slate instead of restoring your previous tabs.

Reopen a tab you just closed with Ctrl+Shift+T

If you close a tab by mistake, press Ctrl+Shift+T on Windows or Command+Shift+T on Mac immediately afterward. The browser reopens the tab you just closed and restores it to the same position in your tab bar.

This works for multiple tabs in a row — keep pressing the shortcut and the browser will reopen tabs in reverse order, going back through your recent closes. This only works if you act quickly; once you close the browser entirely or restart it, you can't recover closed tabs this way.

Close tabs to the right of the current tab

Chrome and Edge have a shortcut to close all tabs to the right of your current tab at once: Ctrl+Shift+Alt+W on Windows. This is useful when you've opened a chain of tabs while researching something and want to clean up without closing the tab you're reading.

Firefox and Safari don't have a built-in keyboard shortcut for this action. On those browsers, you'll need to right-click the tab and select "Close tabs to the right" from the menu, or close them one by one with Ctrl+W or Command+W.

Why keyboard shortcuts are faster than your mouse

Your hands are already on the keyboard when you're typing or reading. Moving to your mouse, finding the X button on the tab, and clicking it takes longer than pressing two or three keys. Over a browsing session where you close dozens of tabs, keyboard shortcuts save real time and reduce the friction of switching between input methods.

Keyboard shortcuts also work the same way every time — there's no variation based on screen size, browser zoom level, or how your tabs are arranged. The shortcut works whether you have two tabs open or twenty. This consistency means you can build the habit and use it without thinking.

Many people find that once they start using keyboard shortcuts for closing tabs, they naturally start looking for shortcuts for other common actions like opening new tabs (Ctrl+T or Command+T) or switching between tabs (Ctrl+Tab or Command+Option+Right Arrow). Learning one shortcut often leads to discovering others that speed up your entire browsing workflow.

Frequently Asked Questions

Can I close a tab without losing the page I was reading?

Yes. Close the tab with Ctrl+W or Command+W, then immediately press Ctrl+Shift+T or Command+Shift+T to reopen it. The page loads back to where you left it. You can also right-click an empty space in the tab bar and select "Reopen closed tab" if you prefer using your mouse.

What's the difference between closing a tab and closing the browser?

Closing a tab with Ctrl+W shuts down just that one page. Closing the browser with Ctrl+Shift+W or Command+Shift+W exits the entire application and closes every tab at once. If you have unsaved work in any tab, the browser will warn you before closing.

Do these shortcuts work the same way on my phone?

No. Phone browsers don't have physical keyboards, so these shortcuts don't apply. On iPhone or Android, swipe up on a tab in the tab switcher to close it, or tap the X button that appears when you long-press a tab.

Can I set up a custom keyboard shortcut to close tabs?

The standard shortcuts are built into the browser and can't be changed in Chrome, Firefox, or Safari. Some browser extensions let you create custom shortcuts, but the default Ctrl+W and Command+W are faster to learn and work everywhere.

What happens to my browsing history when I close a tab?

Closing a tab doesn't delete it from your browsing history. The page remains in your history even after you close the tab, so you can find it again by searching your history or typing part of the URL in your address bar. Only clearing your browsing history removes pages from the record.