Windows Shortcut Undo: Keys & How to Reverse Actions

How-to basics · Updated November 23, 2026

The quickest way to undo an action in Windows is to press Ctrl+Z. This keyboard shortcut reverses your last action in most applications, including File Explorer, text editors, image editors, and many other programs. If you need to undo multiple steps, press Ctrl+Z repeatedly.

What Exactly Does Ctrl+Z Undo?

Ctrl+Z is the universal undo command in Windows. It reverses the most recent change you made to a document, file, or setting. For example:

  • In Notepad or Word, it deletes the last typed characters or reverts a formatting change.
  • In File Explorer, it restores a file you just deleted or renames it back to its previous name.
  • In an image editor like Paint, it removes the last brush stroke or shape you drew.
  • In Excel, it undoes the last cell edit, formula entry, or formatting change.

The shortcut works across virtually all Windows applications because it is a standard part of the Windows user interface. However, the number of undo steps available varies by program. Some applications store hundreds of steps, while others only remember a few.

How to Undo with Mouse and Menu

If you prefer using a mouse, most applications have an undo button or menu option. In many programs, the undo command is located in the Edit menu or on the Quick Access Toolbar (in Microsoft Office apps). For example, in Word or Excel, the Quick Access Toolbar at the top-left has a curved arrow that undoes the last action. In File Explorer, you can right-click in a folder and select Undo from the context menu, or click the Home tab and then the Undo button.

Redo: The Opposite of Undo

If you undo too much, you can redo the action with Ctrl+Y (or Ctrl+Shift+Z in some programs). Redo reverses the last undo, essentially putting back what you removed. For example, if you deleted a paragraph in Word and then pressed Ctrl+Z to restore it, pressing Ctrl+Y would delete it again. In Excel, Ctrl+Y repeats the last command if you haven’t undone, but after an undo, it redoes the undone action.

Undo in File Explorer and Desktop

File Explorer supports undo for file operations like deleting, renaming, moving, and copying. Pressing Ctrl+Z in File Explorer will undo the last file operation. For instance, if you accidentally moved a file to another folder, Ctrl+Z will move it back. If you deleted a file (and it’s not in the Recycle Bin because you used Shift+Delete), Ctrl+Z may not recover it—that’s a permanent deletion. The desktop also supports undo; if you delete an icon, press Ctrl+Z on the desktop to restore it.

Common Problems and Limitations

Undo is not always perfect. Some actions cannot be undone, such as:

  • Permanent deletions with Shift+Delete (bypasses Recycle Bin).
  • Certain system settings changes or registry edits.
  • Actions in applications that don’t implement undo (rare, but some simple tools lack it).
  • Undo history is cleared when you close an application or restart Windows.

Also, in some programs like Photoshop, undo steps are limited by memory settings. In Excel, undo history is limited to a certain number of actions (often 100). If you run into a situation where Ctrl+Z doesn’t work, check if the application has its own undo menu or if the action is truly irreversible.

Keyboard Shortcuts for Undo on Mac and Other Systems

If you’re using Windows with a Mac keyboard (e.g., via Boot Camp or a remote desktop), the Command key on Mac maps to the Windows key, but the undo shortcut is different. On a Mac, undo is Command+Z. In Windows, the equivalent is Ctrl+Z. If you’re using a Mac keyboard on Windows, you’d press the Control key (which is usually labeled “control” or “ctrl”) instead of Command. For example, if you’re using a Mac keyboard connected to a Windows PC, press the key that has the Control symbol (^) to emulate Ctrl.

Undo in Specific Applications

While Ctrl+Z is universal, some applications have additional undo features:

  • Microsoft Office (Word, Excel, PowerPoint): You can click the drop-down arrow next to the Undo button to see a list of recent actions and undo several at once. The default undo limit in Excel is 100 steps, but you can change it in Options > Advanced > Editing Options.
  • Notepad: Windows 11’s Notepad has a multi-level undo (Ctrl+Z repeatedly). Older versions had only a single-level undo.
  • File Explorer: Undo works for file operations, but it doesn’t have a history list—you can only undo the most recent operation.
  • Command Prompt and PowerShell: These don’t have an undo command. Be careful with commands like del or rmdir—they are permanent.

Frequently Asked Questions

Can I undo a Ctrl+Z that I did by mistake?
Yes, press Ctrl+Y (or Ctrl+Shift+Z in some apps) to redo the action you just undid. This restores the state before the undo.

Does Ctrl+Z work in the Windows Settings app?
No, the Settings app does not support undo. Changes you make to system settings are applied immediately and cannot be reverted with Ctrl+Z. You’ll need to manually change the setting back.

Why doesn’t Ctrl+Z undo my file deletion in File Explorer?
If you used Shift+Delete to permanently delete a file, it bypasses the Recycle Bin and is not recoverable with undo. Also, if you’ve done other actions after the deletion, the undo history might have been overwritten.

How many times can I press Ctrl+Z?
It depends on the app. Most modern applications allow dozens or even hundreds of undo steps. For example, Word and Excel allow up to 100 undos by default. In some apps, you can change this limit in settings.

Is there a way to undo a system restore or Windows update?
No, you cannot undo a Windows update with Ctrl+Z. However, you can uninstall a recent update via Settings > Windows Update > Update history > Uninstall updates. System Restore can also revert your system to a previous point, but it’s not an undo shortcut.

Alternatives to Undo for Recovering Lost Work

If Ctrl+Z isn’t enough, consider these alternatives:

  • Recycle Bin: For deleted files, check the Recycle Bin and restore them.
  • File History or Backup: Windows File History can restore previous versions of files. Right-click a file in File Explorer, select Properties, and go to the Previous Versions tab.
  • Version History in Office: Word, Excel, and PowerPoint autosave versions. Go to File > Info > Version History to recover an earlier draft.
  • System Restore: For system-level changes, create a restore point before making major changes, and use it to roll back.

Remember that undo is a safety net, but it’s not a substitute for saving your work regularly and keeping backups.

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.