The basic way: the red button in the top left
On a Mac, the easiest way to close a window is to click the red circle button in the top left corner of that window. This button sits next to a yellow button (minimize) and a green button (maximize). One click on the red button closes the window and removes it from your screen.
This works the same way in almost every program on a Mac — whether you're closing a web browser window, a document, an email, or a folder. The red button is always in the same spot, and it always does the same thing.
Key Takeaways
- The red circle button in the top left corner of any window closes that window when ready.
- Closing a window is different from quitting an entire program — the program keeps running in the background even after you close all its windows.
- You can also close a window by pressing Command+W on your keyboard, which is faster than using the mouse.
- If a program has unsaved changes, it will ask you to save before closing the window.
- Closing all windows in a program does not automatically quit that program; you have to quit it separately.
Using the keyboard shortcut Command+W
If you prefer not to use the mouse, you can close the current window by pressing Command+W on your keyboard. Command is the key with the four-leaf clover symbol on it, usually next to the spacebar. Hold it down and press W at the same time, then release both.
This shortcut works in almost every Mac program and is often faster than moving your mouse to the red button. If you have multiple windows open in the same program, Command+W closes only the one you are currently using, leaving the others open.
The difference between closing a window and quitting a program
Many people think that closing all the windows in a program means the program has shut down. It does not. When you close a window, the program itself keeps running in the background. You can see this because the program's name still appears in the menu bar at the top of the screen, and the program's icon may still show in the Dock at the bottom.
To actually quit a program completely, you need to use Command+Q or go to the program's menu and select Quit. Closing windows just removes them from view; quitting removes the program from memory. This matters because a program running in the background still uses some of your Mac's resources, even if you cannot see it.
What happens if you have unsaved work
If you try to close a window that contains unsaved changes — like a document you have edited but not saved — most programs will show you a dialog box asking what you want to do. The dialog usually offers three choices: Save, Don't Save, or Cancel.
Clicking Save will save your work before closing the window. Clicking Don't Save will close the window without saving, which means you lose any changes you made since the last time you saved. Clicking Cancel stops the close action and takes you back to your document so you can save it yourself.
Closing multiple windows at once
If you want to close all the windows in a program at the same time, you can use Command+Option+W. This closes every window that program has open, but the program itself keeps running. You will still need to quit the program separately if you want it to stop running completely.
Another way to close multiple windows is to quit the entire program using Command+Q. This closes all its windows at once and stops the program from running. If any of those windows have unsaved changes, the program will ask you to save before quitting.
Using the File menu to close windows
You can also close a window by clicking the program's menu bar at the top of the screen and selecting File, then Close. This method works the same way as clicking the red button or pressing Command+W — it closes only the current window, not the entire program.
The File menu is useful if you forget the keyboard shortcut or prefer using menus. Different programs sometimes organize their menus slightly differently, but almost all of them have a File menu with a Close option.
When the close button does not appear
Some programs or windows do not have a visible close button. This sometimes happens with certain system windows, full-screen applications, or programs that are designed differently. If you cannot see the red button, try using Command+W to close the window. If that does not work, try Command+Q to quit the program entirely.
Full-screen programs — like a game or a video player in full-screen mode — usually require you to press Escape or move your mouse to the top of the screen to make the menu bar appear. Once the menu bar is visible, you can use the red button or Command+W as usual.
Frequently Asked Questions
Does closing a window delete the file or document inside it?
No. Closing a window just removes it from your screen. The file or document still exists on your Mac. If you saved it, you can open it again later. If you did not save it, the unsaved changes are lost, but the file itself remains.
What is the difference between the red button and the yellow button?
The red button closes the window. The yellow button minimizes it, which hides it from view but keeps it open — you can click the program's icon in the Dock to bring the window back. The green button makes the window fill your entire screen (full-screen mode).
Can I close a window without saving my work?
Yes. When you try to close a window with unsaved changes, the program will ask you to confirm. You can click Don't Save to close without saving. Be careful with this option — you will lose any changes you made since the last time you saved.
If I close all windows in a program, does the program stop running?
No. Closing windows only removes them from your screen. The program keeps running in the background. To stop the program completely, you must quit it using Command+Q or by right-clicking its icon in the Dock and selecting Quit.
Why does my Mac ask me to save when I close a window?
The program is protecting your work. If you have made changes to a document but not saved them, the program warns you before closing so you do not accidentally lose your edits. You can choose to save, discard the changes, or cancel the close action.