How To Exit A Tab With Keyboard | Ctrl+W Closes The Current Tab

Pressing Ctrl+W on Windows/Linux or Command+W on Mac closes the active browser tab instantly, no mouse needed.

Closing tabs without touching the trackpad or mouse is one of the quickest ways to speed up browsing. The shortcut works the same across Chrome, Firefox, Edge, and most desktop browsers, so learning it once covers almost everything. One wrong key closes the wrong tab, but a second shortcut brings it right back.

The Core Keyboard Shortcut For Closing A Tab

On any desktop browser, the active tab closes with a two-key press. On Windows and Linux systems, hold Ctrl and tap W. On a Mac, hold Command (⌘) and tap W. The tab disappears immediately, and the browser shifts focus to the next tab left in the row.

In Google Chrome specifically, Ctrl+F4 also closes the current tab on Windows and Linux, giving you a second option if one hand placement feels faster.

Close the wrong tab? Press Ctrl+Shift+T (or ⌘+Shift+T on Mac) to reopen the most recently closed tab, and keep pressing it to restore older ones in reverse order.

How To Close The Whole Browser Window Instead Of One Tab

When the goal is to exit the entire browser, not just a single tab, the shortcut changes. In Chrome and most browsers on Windows, Ctrl+Shift+W or Alt+F4 closes the full window. On a Mac, Command+Shift+W closes the current window.

If only one tab is open, Ctrl+W will close that last tab and end the session, which can make it look like the browser exited. That behavior catches many users expecting Ctrl+W to always leave the browser running—it only preserves the window when other tabs remain.

Quick Reference: Tab And Window Shortcuts

Action Windows / Linux Mac
Close current tab Ctrl+W or Ctrl+F4 ⌘+W
Close current window Ctrl+Shift+W or Alt+F4 ⌘+Shift+W
Reopen last closed tab Ctrl+Shift+T ⌘+Shift+T
Next tab Ctrl+Tab or Ctrl+PgDn ⌘+Option+Right Arrow
Previous tab Ctrl+Shift+Tab or Ctrl+PgUp ⌘+Option+Left Arrow
Open new tab Ctrl+T ⌘+T
Open new window Ctrl+N ⌘+N

Common Mistakes That Confuse The Shortcut

Most confusion comes from two situations. First, pressing Ctrl+W closes the active tab, but if no other tabs exist, the browser window also closes—so the shortcut appears to do something different depending on how many tabs are open.

Second, on Mac, Command+W closes a document window in many apps, not just the browser. In a word processor or image editor, it may close the file without quitting the program. The same muscle memory works across applications, but the result is only a closed tab when the browser is frontmost.

Does The Shortcut Work On Every Browser?

Yes, the Ctrl+W and Command+W shortcuts are universal across the major desktop browsers: Google Chrome, Mozilla Firefox, Microsoft Edge, Safari, Opera, and Brave all use the same key combination. The Ctrl+F4 alternate is Chrome-specific and may not work in every browser, but Ctrl+W remains the reliable choice across all of them.

These shortcuts do not apply to mobile browsers on phones or tablets, where there is no physical keyboard. On a Chromebook, Ctrl+W works exactly as it does on Windows, since Chrome OS shares the same shortcut foundation.

Mac-Specific Chrome Shortcuts Worth Knowing

Action Mac Shortcut
Close current tab or pop-up ⌘+W
Close current window ⌘+Shift+W
Reopen last closed tab ⌘+Shift+T
Switch to previous tab ⌘+Option+Left Arrow
Switch to next tab ⌘+Option+Right Arrow

Close Tab Shortcut: The Two Keys To Remember

For daily use, only two shortcuts matter: Ctrl+W (or ⌘+W) to close a tab, and Ctrl+Shift+T (or ⌘+Shift+T) to bring it back. Between them, no tab loss is permanent, and the mouse can stay in your bag.

References & Sources