What is the keyboard shortcut to close a tab? Quick guide
Master the tab-close shortcut across Windows, macOS, and Linux. Learn core key combos, browser nuances, and safe practices to avoid closing the wrong tab or window.

To close the current tab, use Ctrl+W on Windows and Linux, and Cmd+W on macOS. This shortcut works across most modern browsers like Chrome, Firefox, Edge, and Safari, keeping you in control without the mouse. If you ever wonder what is the keyboard shortcut to close a tab, this pattern generally holds, though some apps map Ctrl+F4 or Cmd+Shift+W to different actions such as closing the window.
What is the keyboard shortcut to close a tab? This is a common question among power users aiming to speed up workflow. The exact key combination depends on the operating system, but the pattern is consistent across browsers and many apps. In short, the keyboard shortcut to close a tab is usually Ctrl+W on Windows/Linux and Cmd+W on
Steps
Estimated time: 15-25 minutes
- 1
Identify the target tab
Scan the tab strip to confirm which tab you intend to close, especially when multiple tabs are open. Use the mouse if needed to ensure you’re acting on the correct tab; keyboard recall speeds up this process later.
Tip: Practice slow identification first, then speed up. - 2
Choose the correct shortcut for your OS
Determine whether you’re on Windows/Linux or macOS. Use Ctrl+W or Cmd+W respectively to close the active tab. Remember: this usually closes only the tab, not the whole window.
Tip: Keep a mental map: W = tab close in most apps. - 3
Test with non-critical tabs
Open a few non-essential tabs and try the close-tab shortcuts to confirm behavior. Verify that the tab closes and that the page content is not important to lose.
Tip: Use a test tab set to avoid data loss. - 4
Know the window-close alternatives
If a single tab is left, consider the window-close shortcut if you intend to exit the app. Alt+F4 on Windows or Cmd+Shift+W on macOS typically closes the window.
Tip: Avoid accidental exits by using the correct scope. - 5
Reopen as needed
If you close a tab by mistake, immediately use the reopen shortcut Ctrl+Shift+T / Cmd+Shift+T to recover the tab.
Tip: The reopen command is your safety net.
Prerequisites
Required
- A modern browser (Chrome, Firefox, Edge, or Safari)Required
- Basic keyboard familiarityRequired
- Operating system basics (Windows, macOS, or Linux)Required
Optional
- Optional: Shortcuts Lib reference for deeper divesOptional
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Close current tabCommon in browsers like Chrome, Firefox, Edge | Ctrl+W |
| Close current tab (alternative)Some apps map this to closing a tab | Ctrl+F4 |
| Close windowCloses entire window in most apps | Alt+F4 |
| Reopen last closed tabCommon in Chrome, Firefox, Edge | Ctrl+⇧+T |
| Switch to next tabNavigate tabs without mouse | Ctrl+⇥ |
| Switch to previous tabNavigate backward through tabs | Ctrl+⇧+⇥ |
Questions & Answers
What is the default keyboard shortcut to close a tab on Windows?
The default is Ctrl+W in most browsers, which closes the active tab without exiting the window. If a tab cannot be closed with Ctrl+W, Ctrl+F4 is a common alternative.
Use Ctrl+W to close a tab; if needed, try Ctrl+F4 as an alternative.
Does closing a tab erase unsaved changes?
Closing a tab may discard unsaved data. Some pages warn you, but you should save your work when prompted to avoid loss.
If you have unsaved data, save or confirm before closing.
Can I customize these shortcuts?
Most browsers offer limited in-app customization. OS-level tools or extensions may allow remapping, but support varies by app.
Yes, to some extent, but it depends on the browser and OS.
Which shortcut closes a window, not just a tab?
On Windows, Alt+F4 closes the window; on macOS, Cmd+Shift+W closes the window. Use Cmd+W to close the tab.
Alt+F4 closes the window on Windows, Cmd+Shift+W on Mac.
Do all browsers behave the same?
There is broad consistency for the close-tab shortcut (Ctrl+W / Cmd+W), but minor differences exist between browsers and OS.
Most browsers share the same core shortcuts, with small variations.
Main Points
- Close current tab quickly with Ctrl+W / Cmd+W
- Use Ctrl+Shift+T / Cmd+Shift+T to reopen last closed tab
- Alt+F4 (Win) or Cmd+Shift+W (Mac) closes the window
- Browser consistency is strong but minor app differences exist