The quickest way to undo and redo on Windows
Ctrl+Z undoes your last action on almost every Windows program. Ctrl+Y or Ctrl+Shift+Z redoes what you just undid. These two shortcuts work the same way across Word, Excel, Notepad, Paint, web browsers, and most other software — press them once to step back or forward one action at a time.
If you prefer using your mouse, most programs show Undo and Redo buttons in the toolbar at the top of the window. The Undo button usually looks like a curved arrow pointing left; the Redo button points right. Click once to undo or redo a single action, or click the small arrow next to the button to see a list of recent actions and jump back or forward to any of them. The number of actions you can undo varies by program. Word and Excel typically remember dozens of changes, while Notepad may only remember a handful. Once you close a file without saving, you cannot undo changes from before you closed it.
Key Takeaways
- Ctrl+Z undoes your last action in nearly all Windows programs, and Ctrl+Y or Ctrl+Shift+Z redoes it.
- Most programs display Undo and Redo buttons in the toolbar if you prefer clicking instead of using keyboard shortcuts.
- Clicking the arrow next to Undo or Redo shows a list of recent actions so you can jump back or forward multiple steps at once.
- The number of actions a program remembers before forgetting them varies — Word remembers more than Notepad — and closing a file erases the undo history.
Using the undo dropdown to jump back multiple steps
Instead of pressing Ctrl+Z ten times to undo ten actions, you can click the small dropdown arrow next to the Undo button and select the action you want to revert to. The list shows your recent changes in order, with the most recent at the top. Click any action in the list and everything from that point forward disappears.
This dropdown is especially useful in Word or Excel when you made several edits and want to go back to a specific moment without undoing everything one at a time. The same dropdown exists for Redo — click the arrow next to the Redo button to see actions waiting to be redone, and select the one you want to jump to. Not all programs display this dropdown. Simpler software like Notepad may not have it, but Word, Excel, Outlook, Paint, and most Adobe programs do. If you do not see the dropdown arrow, your program either does not support it or you have already undone all available actions.
Undo and redo in web browsers
Web browsers like Chrome, Firefox, and Edge support undo and redo the same way desktop programs do. Ctrl+Z undoes your last action — usually typing in a text box or form field — and Ctrl+Y redoes it. If you are filling out a form on a website and make a mistake, these shortcuts work just as they do in Word.
However, undo in a browser does not reverse actions like clicking a link or navigating to a new page. It only undoes text you typed into a form or text field on the current page. If you accidentally navigate away from a page, use your browser's back button (the left arrow in the top left corner) or press Alt+Left Arrow to go back. Some websites disable undo for security reasons — for example, a banking site might not let you undo a transaction you just confirmed. In those cases, Ctrl+Z will not work, and you will need to contact the website's support to reverse the action.
What happens when you undo and then make a new change
If you undo five actions and then type something new, the five actions you undid are gone forever. The program erases them because you have started a new path forward. This is different from a branching timeline in a video game — Windows programs follow a single line, and once you move forward from an undo, the old branch disappears.
This matters most in programs like Word or Excel where you might undo several edits, realize you wanted to keep one of them, and then make a new change. At that point, you cannot redo the actions you undid earlier. If you think you might need them back, undo only as far as you need to, make your new change, and then redo the actions you want to keep.
Undo and redo limits in different programs
Microsoft Word and Excel let you undo up to 100 actions by default, though you can change this limit in settings. Google Docs stores your entire edit history in the cloud, so you can revert to any version from the past 30 days using the Version History menu. Photoshop remembers 20 to 30 actions depending on your settings, while Paint remembers only a few.
Notepad and other basic text editors typically remember only 5 to 10 actions before they start forgetting the oldest ones. If you work with important documents, save your file frequently so that even if you run out of undo steps, you can close without saving and reopen the last saved version. Some programs let you adjust how many actions they remember. In Word, go to File > Options > Advanced and look for "Undo" settings. In Photoshop, go to Edit > Preferences > Performance and adjust the History States slider. Allowing more undo steps uses more of your computer's memory, so if your PC is slow, reducing this number may help.
When undo does not work
Undo stops working once you close a file without saving. If you close Word without saving a document, you cannot undo changes from that session. Some programs offer a recovery feature — Word can recover unsaved documents through File > Info > Manage Documents — but this is not the same as undo and does not always work.
Undo also does not work for actions outside the program itself. If you delete a file from your desktop, Ctrl+Z in Word will not bring it back. Instead, check your Recycle Bin (the trash icon on your desktop) and restore the file from there. If the Recycle Bin is empty, the file is gone unless you have a backup. Some actions in programs like Excel cannot be undone. Saving a file, printing, or sending an email are permanent and cannot be reversed with Ctrl+Z. If you save a file with changes you did not mean to make, you will need to manually fix those changes or close without saving and reopen the last saved version.
Keyboard shortcuts for undo and redo on Mac
If you use a Mac instead of Windows, the shortcuts are slightly different. Command+Z undoes on Mac, and Command+Shift+Z redoes. The behavior is identical to Windows — press once per action, or click the dropdown arrow next to Undo to jump back multiple steps.
All the same limits explore: closing a file erases the undo history, and undoing and then making a new change erases the actions you undid. The undo dropdown, the number of remembered actions, and the inability to undo after closing a file all work the same way on Mac as they do on Windows. If you switch between a PC and a Mac, the only difference you will notice is the Command key instead of Ctrl.
Frequently Asked Questions
Can I undo after I save a file?
Yes. Saving a file does not erase your undo history. You can save your work and then continue to undo and redo actions. However, once you close the file and reopen it, the undo history is gone and you cannot undo changes from before you closed it.
What is the difference between Ctrl+Y and Ctrl+Shift+Z for redo?
Both do the same thing in most programs — they redo the last action you undid. Ctrl+Y is the older standard and works in Word, Excel, and most Windows software. Ctrl+Shift+Z is newer and is the standard in Adobe programs like Photoshop and Illustrator. If one does not work, try the other.
Why does undo not work in my browser?
Undo in a browser only works on text you type into form fields on the current page. It does not undo navigation, clicks, or actions on websites that disable undo for security. If you need to go back to a previous page, use your browser's back button instead.
Can I recover changes after I close a file without saving?
It depends on the program. Word and Excel offer an AutoRecover feature that saves versions of your document automatically. Go to File > Info > Manage Documents to see if a recovered version exists. Other programs may not have this feature, so saving your work regularly is the safest approach.
How do I increase the number of actions I can undo?
In Word, go to File > Options > Advanced and search for "Undo" to change the limit. In Photoshop, go to Edit > Preferences > Performance and adjust the History States slider. Other programs have similar settings in their preferences or options menu. Allowing more undo steps uses more memory, so balance this against your computer's performance.