The three ways to close a window on Mac

On Mac, closing a window is not the same as closing an app. When you close a window, the program stays running in the background — you just remove that particular window from your screen. Most people close windows using the red button in the top-left corner of the window, but Mac gives you two other methods that are faster once you know them.

The red close button is the most obvious: click it and the window shuts. The keyboard shortcut Command + W does the same thing when ready, without reaching for the mouse. If you want to close all windows belonging to one app at once, use Command + Option + W instead. Each method closes the window but leaves the app itself running — you will still see the app's name in the menu bar at the top of the screen.

Key Takeaways

  • The red button in the top-left corner of any window closes that window, but the app keeps running in the background.
  • Command + W closes the active window when ready and works in almost every Mac app.
  • Command + Option + W closes all windows for the current app at once, which is faster than closing them one by one.
  • Closing a window is different from quitting an app — the app continues to run until you quit it from the menu or use Command + Q.

Using the red close button

The red button sits in the top-left corner of every Mac window, next to a yellow button and a green button. Click the red one and the window closes when ready. This is the method most people learn first because it is visible and requires no memorization.

The red button works the same way in every app — Mail, Safari, Word, Preview, and thousands of others. If you have multiple windows open in the same app, clicking the red button closes only the window you clicked on. The other windows stay open, and the app keeps running.

Closing windows with Command + W

Command + W is the fastest way to close the window you are currently working in. Hold down the Command key (the one with the Apple logo) and press W, then release both. The active window closes when ready.

This shortcut works in nearly every Mac app you will encounter — web browsers, text editors, spreadsheets, photo apps, and more. It is much faster than moving your hand to the mouse, finding the red button, and clicking it. Once you use Command + W a few times, it becomes automatic.

If you have multiple windows open and you press Command + W, only the window you are currently looking at closes. The other windows remain open. If you want to close all windows at once, use the next method instead.

Closing all windows in an app with Command + Option + W

Command + Option + W closes every window belonging to the app you are currently using. Hold Command, hold Option (also called Alt), and press W. All windows for that app close at once, but the app itself continues running.

This is useful when you have opened many windows in one app and want to clean them all up without quitting the app. For example, if you have five Safari windows open and you want them all gone but you want Safari to keep running, Command + Option + W does this in one keystroke. If you later want to use Safari again, it is still there in the background.

The difference between closing a window and quitting an app

A closed window means the window is gone from your screen, but the app is still running. You can see this in the menu bar at the top — the app's name is still there. If you click the app's icon in the Dock, nothing happens because there are no windows to show you.

Quitting an app means the app stops running entirely. To quit an app, use Command + Q or click the app's name in the menu bar and select "Quit [App Name]". After you quit, the app's name disappears from the menu bar. The next time you want to use it, you have to open it again from the Applications folder or Spotlight.

For keeping your Mac running safely and smoothly, closing unused windows is a good habit — it reduces clutter on your screen. But if you want to make sure an app is not using resources in the background, you need to quit it instead.

What to do if a window will not close

Occasionally a window gets stuck and will not close using the normal methods. Try Command + W first — sometimes the red button is unresponsive but the keyboard shortcut works. If that does not work, click the app's name in the menu bar at the top of the screen and look for a "Force Quit" option, or use Command + Option + Escape to open the Force Quit window.

In the Force Quit window, select the app that is stuck and click "Force Quit". This stops the app when ready, which also closes all its windows. You can then reopen the app fresh. Force quitting should be a last resort — it does not give the app a chance to save your work, so you may lose unsaved changes.

Frequently Asked Questions

What do the yellow and green buttons do?

The yellow button minimizes the window — it hides the window but keeps the app running. Click the app's Dock icon to bring it back. The green button makes the window as large as possible while still fitting on your screen. Neither button closes the window.

If I close all my windows, does the app quit?

No. Closing all windows leaves the app running in the background. You will still see the app's name in the menu bar. To actually quit the app, press Command + Q or use the menu bar.

Can I undo closing a window?

Most apps let you reopen a closed window by pressing Command + Shift + T (in web browsers) or Command + Z (in some other apps). Check your app's menu to see if this option is available. Otherwise, you will need to manually reopen the window.

Does closing windows help my Mac run faster?

Closing windows removes them from your screen but does not free up much memory because the app is still running. To actually reduce what your Mac is using, quit the app entirely with Command + Q.