Close a tab with one click or keyboard shortcut

To delete a tab, click the X button on the tab itself — it appears on the right side of the tab name at the top of your browser window. On most browsers, you can also close the active tab by pressing Ctrl+W on Windows or Command+W on Mac. The tab disappears immediately, and the next tab to the right becomes active. If you close a tab by accident, press Ctrl+Shift+T (Windows) or Command+Shift+T (Mac) to reopen it.

The X button is always visible on the tab you are currently viewing. On inactive tabs, the X may only appear when you hover your mouse over that tab. This prevents accidental clicks when you have many tabs open.

Key Takeaways

  • Click the X on any tab to close it, or use Ctrl+W (Windows) or Command+W (Mac) to close the current tab.
  • Closing a tab does not delete your browsing history — it only removes the open page from your browser window.
  • You can reopen a closed tab immediately by pressing Ctrl+Shift+T (Windows) or Command+Shift+T (Mac).
  • If you close multiple tabs at once, you can reopen them one at a time using the same keyboard shortcut.
  • Closing all tabs in a window is different from closing a single tab and requires a separate action.

Where the X button appears on different browsers

In Chrome, Firefox, Safari, and Edge, the X button sits at the right edge of each tab. When you have many tabs open, the X may shrink or hide until you move your cursor over the tab. This design prevents you from closing the wrong tab by accident when tabs are narrow.

On mobile browsers (Chrome on Android, Safari on iPhone), closing a tab works differently. In Chrome for Android, swipe left on the tab preview to close it. In Safari on iPhone, tap the tab grid icon at the bottom right, then swipe up on the tab you want to close.

Closing multiple tabs at once

If you want to close several tabs but keep your browser open, close them one at a time using the X button or Ctrl+W. There is no built-in way to select multiple tabs and close them together in most browsers, though some extensions add this feature.

If you want to close all tabs in your current window, use Ctrl+Shift+W (Windows) or Command+Shift+W (Mac). This closes the entire window, not just the tabs. If you have unsaved form data on any of those tabs, most browsers will warn you before closing.

What happens when you close a tab

Closing a tab removes it from your browser window but does not erase your browsing history. The page you were viewing stays in your browser history, and you can find it again by searching your history or typing the web address into the address bar.

If you were in the middle of filling out a form on that tab, the information you typed is usually lost. Some websites and browsers can restore form data, but this is not may provide. If you need to save information before closing a tab, copy the text first or look for a "Save draft" button on the page.

Recovering a tab you closed by mistake

Press Ctrl+Shift+T on Windows or Command+Shift+T on Mac to reopen the last tab you closed. Each time you press this combination, it reopens the next most recent closed tab, going back through your session. This works even if you closed multiple tabs — you can recover them one at a time.

This keyboard shortcut only works during your current browser session. Once you close your browser completely and reopen it, you cannot use this method to recover tabs from the previous session. However, you can still find those pages in your browsing history.

Pinned tabs and closing them

Some browsers let you pin a tab so it stays open and takes up less space. In Chrome and Edge, right-click a tab and select "Pin tab" to lock it in place. Pinned tabs appear at the left side of your tab bar and show only a favicon (the small icon) instead of the full page title.

To close a pinned tab, right-click it and select "Unpin tab" first, then click the X. You cannot close a pinned tab by clicking the X directly — the browser prevents accidental closure of tabs you have marked as important.

Closing tabs without using the mouse

If you prefer keyboard shortcuts, Ctrl+W (Windows) or Command+W (Mac) closes the current active tab. You can press this combination multiple times to close tabs one after another. Some users find this faster than reaching for the mouse, especially when closing many tabs.

In Firefox, you can also use Ctrl+F4 on Windows to close a tab, though Ctrl+W works as well. On Mac, Command+W is the standard across all browsers.

Frequently Asked Questions

Does closing a tab delete my browsing history?

No. Closing a tab only removes it from your open windows. The page stays in your browsing history and you can find it by searching your history or typing the address again. To actually delete something from your history, you must clear your browsing data through your browser settings.

Can I close a tab on someone else's computer without them knowing?

If you close a tab on another person's browser, they will see that it is gone when they look at their tab bar. However, the page remains in their browsing history. If you want to remove all trace of a page, you would need to clear their browsing history, which is a separate action.

What if I close a tab and lose unsaved work?

Most websites and web applications auto-save your work, but not all do. If you were typing in a form or document, check if the website has a recovery feature or draft folder. For future sessions, save your work before closing the tab, or look for a "Save draft" button on the page itself.

Why can't I close a pinned tab by clicking the X?

Pinned tabs are locked to prevent accidental closure. Right-click the pinned tab and select "Unpin tab" first, then you can close it normally. This design protects tabs you have marked as important from being closed by mistake.

Can I close all tabs except one?

Most browsers do not have a built-in feature for this, but you can close tabs one at a time using Ctrl+W or the X button. Some browser extensions add a "Close other tabs" option when you right-click a tab, which closes all tabs except the one you clicked on.