The quickest way to undo on your PC

Press Ctrl+Z to undo your last action on almost any Windows program. This works in word processors, spreadsheets, image editors, email, web browsers, and file managers. One press undoes one action; press it again to undo the action before that. You can usually undo between 10 and 100 recent actions, depending on the program.

If you are using a Mac, press Command+Z instead. The principle is the same: each press steps back one action.

If your keyboard does not have these keys or you prefer the mouse, most programs also have an Undo button in the toolbar or menu. Look for an arrow pointing left, usually near the top left of the window.

Key Takeaways

  • Ctrl+Z (Windows) or Command+Z (Mac) undoes your last action in nearly every program on your computer.
  • Pressing Undo multiple times steps back through your recent actions one at a time.
  • Most programs let you undo between 10 and 100 actions, though some have limits.
  • If Undo does not work, the program may not support it, or you may have already reached the undo limit.
  • Redo (Ctrl+Y on Windows, Command+Y on Mac) reverses an undo if you change your mind.

What happens when you undo

When you press Ctrl+Z, your program removes the last change you made and restores what was there before. If you typed a sentence, it disappears. If you deleted a paragraph, it comes back. If you moved a file to a folder, it returns to where it was.

Each program keeps a record of your recent actions in memory. When you undo, the program works backward through that list. Once you close the program without saving, the undo history is lost — you cannot undo changes from a previous session. If you save your file, the changes become permanent and cannot be undone by restarting the program.

Undo limits and when they matter

Most Windows programs store between 10 and 100 undo steps. Microsoft Word and Excel typically allow 100 undos. Paint allows 10. Some programs like Photoshop let you change the undo limit in settings, trading memory for more steps backward.

If you have undone many actions and reach the limit, the oldest actions disappear from the undo history. You cannot go back further. This is why saving your work regularly matters — once you close and reopen a file, you lose all undo history and cannot recover changes from before you last saved.

Using Redo to reverse an undo

If you undo something and then change your mind, press Ctrl+Y on Windows or Command+Y on Mac to redo it. This restores the action you just undid. You can redo multiple times to step forward through actions you have undone.

The moment you make a new change after undoing, the redo history is erased. For example: you type a sentence, undo it, then type a different sentence. You can no longer redo the first sentence — the redo list now contains only the new sentence you just typed.

When Undo does not work

Some programs do not support undo. Older software, command-line tools, and some system utilities do not track changes. If Ctrl+Z does nothing, the program straightforward does not have this feature.

Undo also does not work across programs. If you copy text from one window and paste it into another, undoing in the second window undoes only the paste, not the copy. Each program maintains its own undo history.

Certain actions cannot be undone even in programs that support undo. Deleting a file permanently (not to the Recycle Bin) usually cannot be undone. Restarting your computer clears the undo history. Closing a program without saving erases all undo steps from that session.

Undo in specific Windows programs

File Explorer: Ctrl+Z undoes file moves and renames. Deleted files go to the Recycle Bin and can be restored from there, but this is not technically an undo.

Notepad: Supports undo and redo. Ctrl+Z undoes typing; Ctrl+Y redoes.

Paint: Allows 10 undo steps by default. Ctrl+Z steps back through edits.

Microsoft Office (Word, Excel, PowerPoint): Supports up to 100 undos. Ctrl+Z works in all three. You can also click the dropdown arrow next to the Undo button to see a list of recent actions and jump back to any of them.

Web browsers: Ctrl+Z undoes text you have typed in a form or search box, but does not undo navigation or page actions.

Keyboard shortcuts for undo and redo

ActionWindowsMac
UndoCtrl+ZCommand+Z
RedoCtrl+YCommand+Y
Undo (alternative)Ctrl+Alt+Z (some programs)Command+Shift+Z (some programs)

Most programs use Ctrl+Z and Ctrl+Y, but some older or specialized software may use different shortcuts. If the standard shortcuts do not work, check the program's Help menu or Edit menu for the correct command.

Frequently Asked Questions

Can I undo something after I close the program?

No. Once you close a program, the undo history is erased. If you saved the file before closing, the changes are permanent. If you did not save, the changes are lost but cannot be recovered through undo. To protect your work, save frequently while you are working.

What is the difference between undo and the Recycle Bin?

Undo reverses the last action within a program — typing, editing, moving a file. The Recycle Bin holds files you have deleted from Windows. Deleted files in the Recycle Bin can be restored, but this is not an undo; it is a separate recovery step. Emptying the Recycle Bin permanently deletes files.

Why does Ctrl+Z not work in some programs?

Some programs do not support undo, especially older software or command-line tools. Others may use different keyboard shortcuts. Check the program's Edit menu or Help section to see if undo is available and what shortcut it uses.

Can I undo multiple actions at once?

You can press Ctrl+Z repeatedly to step back through actions one at a time. In Microsoft Office, you can click the dropdown arrow next to the Undo button to see a list of recent actions and jump back to any point in that list, undoing everything after it at once.

Does undo work the same way on all Windows computers?

Yes. Ctrl+Z is the standard undo shortcut across Windows programs. The number of undo steps available varies by program, but the shortcut itself is consistent. Some programs may offer additional undo features in their settings or menus.