Skip to content
CtrlKFind a shortcut

Close Shortcut Key for Windows, Tabs and Mac

WindowsPrograms and tabsWindows and MacChecked 2 Nov 2026

Close the program

AltF4

Close a tab or document

CtrlW

Laptop

FnAltF4

Mac

CommandQ

Command + W closes one window

The close shortcut key in Windows is Alt + F4: it closes the program or window in front. If the file has unsaved changes, the program asks whether to save first. To close only one browser tab or one document and keep the program open, press Ctrl + W instead.

On many laptops F4 also mutes the microphone or changes a setting, so the laptop close shortcut key becomes Fn + Alt + F4. On the empty desktop, Alt + F4 opens the shut down box rather than closing anything.

Quick facts

  • Close program

    Alt + F4
  • Close tab or document

    Ctrl + W
  • Close browser window

    Ctrl + Shift + W
  • Laptop

    Fn + Alt + F4
  • Close a dialog

    Esc
  • Mac

    Command + Q or Command + W

Close shortcut key options

What each close key does
KeysClosesProgram stays open?
Alt + F4The whole program windowNo
Ctrl + WThe current tab or documentYes
Ctrl + F4The current document in some programsYes
Ctrl + Shift + WThe whole browser window with all its tabsNo
EscA dialog box or menuYes

Alt + F4 shortcut key is used for

Alt + F4 is used for closing the active program, the same as clicking the X at the top right. Pressed repeatedly, it closes one program after another. With nothing open and the desktop selected, it opens the Shut Down Windows box instead, which is why the shutdown shortcut key guide starts with Win + D.

Pressing Alt + F4 too many times on the desktop is harmless: the shut down box still waits for Enter.

Close all windows shortcut

Windows has no single key that closes every program. To clear the screen quickly without closing, press Win + D or Win + M; see the minimize shortcut key. To close several programs, press Alt + F4 once for each, saving files as prompted. Shutting down or restarting also closes everything in one go.

At the end of a shift, an office executive presses Alt + F4 four times: email, billing app, Excel and the browser close one by one, each asking about unsaved work before going.

Exit shortcut key and Ctrl + Q

Some programs use Ctrl + Q to quit, but it is not universal. In Word, Ctrl + Q removes paragraph formatting instead, and in many Windows apps it does nothing. Stick to Alt + F4 on Windows. In Chrome and Edge, Ctrl + Shift + W closes the current window, and Ctrl + Shift + T reopens a tab closed by mistake; see the close tab shortcut.

When the close keys do not work

Problems and fixes
ProblemFix
Alt + F4 mutes the micUse Fn + Alt + F4
Program will not closeIt has frozen; use Ctrl + Shift + Esc and End task
Shut down box appearsThe desktop was active; press Esc
Full screen game ignores itSome games block it; use the game's own exit menu

Frozen programs are covered in the Task Manager shortcut guide.

Close on a Mac

On a Mac, Command + W closes the front window or tab, and Command + Q quits the whole app. Option + Command + W closes all windows of the app. Clicking the red button only closes the window; the app may keep running, shown by a dot under its Dock icon.

This site is not affiliated with Microsoft or Apple; this is an independent explanation.

Frequently asked questions

What is the close shortcut key in Windows?
Alt + F4 closes the program; Ctrl + W closes a tab or document.
What is the shortcut key to close a window on a laptop?
Alt + F4, or Fn + Alt + F4 if F4 is a media key.
What is Alt + F4 used for?

Closing the active program, or opening the shut down box from the desktop.

Is there a shortcut to close all windows?

No single key. Press Alt + F4 for each program, or shut down.

What does Ctrl + Q do?

It quits some programs, but in Word it removes paragraph formatting.

What is the close shortcut on a Mac?
Command + W for a window, Command + Q to quit.