Shortcut for Closing All Windows on Windows and Mac

How-to basics · Updated November 23, 2026

The fastest universal shortcut for closing all open windows on a desktop is Alt+F4 on Windows (press repeatedly) and Cmd+Option+W on a Mac to close all windows of the current app. For closing every window across all apps at once, no single built-in key does that on either OS—you need to combine shortcuts or use a third-party tool.

What the Shortcut Actually Does

On Windows, Alt+F4 closes the active window. If you hold it down or press it repeatedly, it closes windows one by one, ending with the desktop or a shutdown dialog if no windows remain. On a Mac, Cmd+Option+W closes all windows of the frontmost application (e.g., all Safari tabs become individual windows if you’ve enabled that setting). Cmd+Q quits the app entirely, which also closes all its windows.

For closing all windows of every running app on Windows, there is no native shortcut. You can use Win+D to minimize everything, but that doesn’t close them—it just hides them. To truly close all, you’d press Alt+F4 repeatedly or use a utility like Close All Windows (a free tool) that sends a close command to every window.

How Window Closing Works in Each OS

Windows treats each window as an independent object. The Alt+F4 command sends a WM_CLOSE message to the focused window, which triggers the app’s normal close routine—so unsaved changes prompt a dialog, just like clicking the X. On macOS, the close button (red circle) closes the window but leaves the app running; Cmd+W closes the front window, Cmd+Option+W closes all windows of that app, and Cmd+Q terminates the app process.

In many macOS apps, closing the last window does not quit the app—the menu bar remains. This is a key difference: on Windows, closing the last window often exits the app (though some apps like Microsoft Word keep running in the background).

How to Choose the Right Shortcut for Your Situation

Decide based on what you want to achieve:

  • Close only the current window: Windows – Alt+F4 or Ctrl+W (works in browsers and many apps); Mac – Cmd+W.
  • Close all windows of the current app: Windows – no single key, but you can right-click the taskbar icon and choose “Close all windows” (Windows 11) or use a script; Mac – Cmd+Option+W.
  • Quit the app entirely: Windows – Alt+F4 on the main window or Ctrl+Shift+Esc to open Task Manager and end task; Mac – Cmd+Q.
  • Hide everything without closing: Windows – Win+D; Mac – Cmd+Option+H (hides other apps) or Cmd+H (hides current).

If you want to close all windows across all apps on Windows, the most reliable method is to press Alt+F4 repeatedly, but that’s slow. A faster approach is to use a free tool like Close All Windows (from the Microsoft Store) that adds a system tray icon—click it once to close everything.

Common Problems and Misconceptions

Misconception: “Win+D closes all windows.” It only minimizes them. Your data is still open and unsaved changes remain at risk if the system crashes.

Problem: Alt+F4 sometimes doesn’t work. Some apps (like full-screen games) intercept the key. In that case, use Ctrl+Shift+Esc to open Task Manager, select the app, and click “End task.”

Problem: Cmd+Option+W doesn’t close all windows. It only works if the app supports that command. Some apps (e.g., older Adobe products) may ignore it. Use Cmd+Q to quit instead.

Problem: Closing all windows loses unsaved work. Both OSes prompt for unsaved changes in most apps, but some (like Notepad on Windows) may close without prompting if you’ve disabled it. Always save before mass-closing.

Comparison: Windows vs. macOS vs. Chrome OS

On Chrome OS (Chromebook), the shortcut is Ctrl+Shift+W to close all windows of the current browser profile, but it only affects Chrome, not other apps. On Windows, you can close all windows of a single app by right-clicking its taskbar icon and selecting “Close all windows” (Windows 10/11). On macOS, there’s no equivalent to “close all windows of all apps” natively; you’d use Cmd+Option+Escape to force-quit a specific app, but that’s not for all.

For power users, Windows offers a hidden feature: pressing Ctrl+Alt+Delete and then “Sign out” closes all apps (but also logs you out). Mac’s “Log Out” does the same. These are drastic, but they do close everything.

Keyboard Shortcut Reference Table

Here’s a quick reference for the most common shortcuts:

  • Windows – Close current window: Alt+F4 or Ctrl+W (in browsers)
  • Windows – Close all windows of one app: Right-click taskbar icon → “Close all windows” (Win11) or use a third-party tool
  • Windows – Minimize all: Win+D
  • Mac – Close current window: Cmd+W
  • Mac – Close all windows of current app: Cmd+Option+W
  • Mac – Quit app (closes all its windows): Cmd+Q
  • Mac – Hide other apps: Cmd+Option+H

Third-Party Tools for “Close All” on Windows

If you frequently need to close every window, consider these free utilities:

  • Close All Windows (Microsoft Store) – Adds a tray icon; one click closes all open windows with a confirmation.
  • AutoHotkey script – You can write a simple script that sends !F4 repeatedly. Example: ^!c::WinClose, A (Ctrl+Alt+C closes active window), but to close all, you’d loop through windows.
  • Windows PowerToys – No built-in “close all,” but you can use FancyZones to manage layouts, not close.

On macOS, a popular tool is Keyboard Maestro (paid) or Hammerspoon (free) to script closing all windows, but most users find Cmd+Option+W per app sufficient.

Safety and Data Loss Prevention

Closing all windows can cause data loss if you have unsaved work. Always save before using mass-close shortcuts. On Windows, Alt+F4 triggers the app’s close event, which usually prompts to save, but some apps (like Notepad) may close without prompting if you’ve turned off the setting. On Mac, Cmd+Q prompts for unsaved changes in most apps, but not all (e.g., Terminal may close without asking).

If you’re closing windows to free up memory, note that closing a window doesn’t always free memory if the app stays running (on Mac). To truly free memory, quit the app entirely. On Windows, closing the last window usually exits the app, but some apps (like Slack) keep running in the system tray.

Frequently Asked Questions

Is there a shortcut to close all windows at once on Windows? No native one. The closest is Alt+F4 pressed repeatedly, or using a third-party tool like “Close All Windows.” You can also press Win+D to minimize, but that doesn’t close.

Does Cmd+Option+W close all windows of all apps on Mac? No, only the frontmost app. To close all windows across all apps, you’d need to quit each app with Cmd+Q or use a scripting tool.

What’s the difference between closing a window and quitting an app? Closing a window leaves the app running in the background (especially on Mac). Quitting the app terminates all its processes and releases memory. On Windows, closing the last window often quits the app, but not always.

Can I close all windows with a single key on a Chromebook? Yes, Ctrl+Shift+W closes all windows of the current Chrome profile, but it only affects Chrome, not other Android or Linux apps.

Will Alt+F4 close all windows if I hold it down? On Windows, holding Alt+F4 will repeatedly close windows one after another, but it may also trigger the shutdown dialog after the last window. It’s not a true “close all” and can be slow.

Does closing all windows delete my unsaved work? It depends on the app. Most apps prompt to save, but some don’t. Always save manually before mass-closing to be safe.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.