Closing a tab with the mouse is easy, but the keyboard is faster and works even when the pointer is stuck or the app is full screen. This guide gives you the single shortcut that works in almost every tabbed app, plus browser- and OS-specific tips. It also covers File Explorer and Finder tabs, troubleshooting when a shortcut doesn’t respond, and quick ways to undo a mistake and reopen a closed tab.
Before you start
- Active tab matters: Shortcuts act on the tab that has focus. If nothing happens, press Ctrl+Tab (Windows/Linux/Chromebook) or Cmd+Option+Right (Mac, in some apps) to move focus first.
- Two families of shortcuts: Most modern apps use Ctrl/Cmd+W. Legacy Windows apps may also support Ctrl+F4.
- Reopen is your safety net: If you close a tab by accident, try Ctrl/Cmd+Shift+T in browsers to bring it back.
Keyboard cheat sheet
| Platform/App | Close Current Tab | Reopen Closed Tab | Close Window |
|---|---|---|---|
| Windows/Linux browsers (Chrome, Edge, Firefox, Brave, Opera) | Ctrl+W or Ctrl+F4 | Ctrl+Shift+T | Alt+F4 or Ctrl+Shift+W |
| macOS browsers (Safari, Chrome, Firefox, Brave) | Cmd+W | Cmd+Shift+T | Cmd+Shift+W |
| Chromebook (ChromeOS) | Ctrl+W | Ctrl+Shift+T | Ctrl+Shift+W |
| Windows 11 File Explorer | Ctrl+W | — | Alt+F4 |
| macOS Finder | Cmd+W | — | Cmd+Shift+W |
| VS Code and many editors | Ctrl/Cmd+W (or Ctrl+F4 on Windows) | Editor-specific (often not available) | Alt+F4 (Win) / Cmd+Q (Mac) |
Steps: Browsers on Windows & Linux (Chrome, Edge, Firefox, Brave, Opera)
- Make sure the tab you want to close is in the foreground.
- Press Ctrl+W. The active tab closes instantly.
- To close the entire browser window, press Alt+F4 (or Ctrl+Shift+W in most Chromium browsers).
- Closed the wrong tab? Press Ctrl+Shift+T to reopen the last closed tab. Repeat to restore more.
- Navigate across tabs with Ctrl+Tab (next) and Ctrl+Shift+Tab (previous).
Steps: Browsers on macOS (Safari, Chrome, Firefox, Brave)
- Activate the tab you want to close.
- Press Cmd+W to close the current tab.
- Close the whole window with Cmd+Shift+W. To quit the app, press Cmd+Q.
- Reopen a closed tab with Cmd+Shift+T. Press it multiple times to restore earlier tabs.
- Move across tabs with Ctrl+Tab (next) and Ctrl+Shift+Tab (previous), or use Cmd+1.. Cmd+9 to jump by tab index in many browsers.
Chromebook (ChromeOS)
- Press Ctrl+W to close the active tab.
- Press Ctrl+Shift+W to close the whole window.
- Press Ctrl+Shift+T to reopen the last closed tab.
Windows 11 File Explorer tabs
- Make sure File Explorer is active and the tab you want to close is selected.
- Press Ctrl+W to close the current tab. If only one tab is open, the window closes.
- Open a new tab with Ctrl+T. Move between tabs with Ctrl+Tab or Ctrl+Shift+Tab.
macOS Finder tabs
- With Finder frontmost, select the tab you want to close.
- Press Cmd+W to close it. If it’s the only tab left, the window closes.
- Create a new Finder tab with Cmd+T and switch tabs with Ctrl+Tab or Ctrl+Shift+Tab.
Editors and developer tools (VS Code, JetBrains, etc.)
Most editors follow the same convention: Ctrl/Cmd+W closes the active file tab; Ctrl+F4 often works on Windows as well. In multi-panel layouts, the shortcut closes the focused editor. To close the entire app, use Alt+F4 (Windows) or Cmd+Q (macOS).
Troubleshooting
- Shortcut doesn’t work: Some web apps capture keys. Click inside the page (or press F6 to cycle focus) and try again.
- Remote desktop or virtual machine: Keyboard shortcuts may be intercepted by the host. Enable sending key combinations in your remote client.
- Custom keymaps: If you changed shortcuts in your browser/editor, search Settings for “Close tab.”
- You closed the whole window by mistake: Reopen the browser and press Ctrl/Cmd+Shift+T repeatedly to restore the last session’s tabs (if supported).
FAQs
- Is there a shortcut to close all other tabs? There isn’t a universal keyboard shortcut. Use the tab’s context menu (Right‑click ▶ Close other tabs) or an extension.
- What’s the difference between closing a tab and closing a window? Closing a tab leaves the window open; closing the window ends the whole app window and all its tabs.
- Does Ctrl+W always close a tab? In most tabbed apps, yes. In some older Windows programs it closes the document inside the window; Ctrl+F4 is the legacy equivalent.
- Can I change the shortcut? Many apps let you remap keys. Search for “keyboard” or “shortcuts” in Settings and assign your preferred combo.
Summary (ordered steps)
- Use Ctrl/Cmd+W to close the active tab in most apps.
- Use Ctrl+F4 (Windows) if Ctrl+W doesn’t work.
- To close the whole window, press Alt+F4 (Windows/Linux) or Cmd+Shift+W (macOS/Chromebook).
- Undo mistakes with Ctrl/Cmd+Shift+T in browsers.
Conclusion
The fastest way to close a tab nearly everywhere is Ctrl/Cmd+W. Keep the legacy Ctrl+F4 in your back pocket for older Windows apps, and remember Ctrl/Cmd+Shift+T to rescue a tab you closed by accident. With these keystrokes, you can manage tabs smoothly across browsers, File Explorer, Finder, and popular editors—no mouse required.



Discussion (0)
Be the first to comment.