Keyboard Shortcut for Undo: 5 Proven Steps to Get Your Text Back and Stop Mistakes
The keyboard shortcut for undo is Ctrl+Z on Windows and Command+Z on a Mac, and it reverses the last thing you just did. Deleted a paragraph by mistake? Press Ctrl+Z, and the text comes back at once. Pasted over the wrong line? Press Ctrl+Z, and the old text returns. It is the safety net under every edit you make, and it works in nearly every app on your computer.
Most people know Ctrl+Z exists, but few know how far it reaches or what to do when it stops working. They press it once, nothing seems to happen, and they give up, even though the text is still recoverable. This guide shows the five proven steps for getting your work back, how undo differs between Word, Excel, browsers, and File Explorer, and what to do when undo itself fails. It also links to the unit pillar on the paste keyboard shortcut, because most bad pastes are fixed fastest with one press of Ctrl+Z.
[SNIPPET TARGET] The keyboard shortcut for undo is Ctrl+Z on Windows and Command+Z on a Mac. Press Ctrl+Z to reverse the last action, and press it again to reverse the one before it. Press Ctrl+Y to redo an action you just undid.
ANSWER BOX 1
The keyboard shortcut for undo is Ctrl+Z on Windows, and Command+Z on a Mac. Press it once to reverse the last action, such as a deleted paragraph or a bad paste. Press it again to reverse the action before that, and keep pressing to walk back step by step. In Microsoft Office apps, you can press Ctrl+Z many times in a row, because they remember a long chain of edits.
ANSWER BOX 2
If Ctrl+Z does nothing, the app may have no undo history left, or the action may be one that cannot be undone, such as saving over a file or emptying the Recycle Bin. Check the Edit menu first, because a greyed-out Undo means the history is empty. Then try Ctrl+Y to redo, check the app’s own recovery feature, and look for an autosave or backup copy before you retype anything.
KEY TAKEAWAYS
- The keyboard shortcut for undo is Ctrl+Z on Windows and Command+Z on a Mac, with Ctrl+Y to redo.
- Press Ctrl+Z repeatedly to walk back step by step, because most apps remember a chain of edits.
- Undo depth differs by app: Word and Excel remember many steps, while some tools remember only one.
- Saving, deleting a file, and emptying the Recycle Bin usually cannot be undone, so save backups first.
- When undo fails, check the Edit menu, the app recovery pane, and autosave before you retype anything.
Contents
- What is the keyboard shortcut for undo?
- 5 proven steps to get your text back
- Undo and redo in Word, Excel, browsers, and File Explorer
- How many steps can undo walk back?
- The recovery ladder when undo does not work
- 5 mistakes that stop undo from saving you
- FAQ

What Is the Keyboard Shortcut for Undo?
The keyboard shortcut for undo is a key combination that reverses the most recent action in an app, step by step. Microsoft lists Ctrl+Z as Undo and Ctrl+Y as Redo in its official Windows keyboard shortcuts list (Microsoft Support). Microsoft Learn lists CTRL+Z for Undo and CTRL+Y for Redo as standard shortcut assignments that apps should not reuse for other tasks (Microsoft Learn). That standard is why the same two keys work in Word, in your browser, in Photoshop, and in most other programs you use.
Undo works by keeping a short history of your actions inside the app. Each time you type, delete, paste, or format, the app records what changed, so it can reverse the change later. Press Ctrl+Z, and the app plays the last change backwards. Press it again, and it reverses the one before that. The history is a stack, so undo always walks back in reverse order, and you cannot skip a step in the middle. That order is the key to using undo well, because it means the last thing you did is always the first thing undo fixes.
The redo shortcut is the partner to undo, and it restores what undo just removed. Press Ctrl+Y on Windows, or Command+Shift+Z on a Mac, to bring back the action you just undid. Redo matters because undo is easy to overshoot: you press Ctrl+Z three times when you meant twice, and the third press removes something you wanted to keep. One press of Ctrl+Y puts it back, and the pair together lets you walk forward and backward through your edits until the document looks right. Microsoft released Windows 11 on October 5, 2021 (Microsoft, 2021), and both shortcuts work the same way on Windows 10 and Windows 11.
5 Proven Steps to Get Your Text Back
These five steps recover deleted or damaged text in order, from the fastest fix to the deeper rescue. Follow them in order, and stop as soon as your text is back, because each step takes a little longer than the last. Practice the first two now, so they are automatic when a real mistake strikes.
Step 1: Press Ctrl+Z at once
Do this the second you notice the mistake, before you click or type anything else. A new click or keystroke can add a fresh action to the history, and undo will then reverse that new action first. Press Ctrl+Z once, look at the screen, and check whether the text is back. If it is not, press Ctrl+Z again, because the mistake may have been two actions, not one. Keep pressing slowly, one at a time, and watch the screen after each press, so you stop the moment the text returns.
Step 2: Press Ctrl+Y if you went too far
If you pressed Ctrl+Z one time too many and lost something you wanted to keep, press Ctrl+Y to redo it. Redo restores the last undone action, so it walks you forward again. Use the pair together like a shuttle: Ctrl+Z to go back, Ctrl+Y to go forward, until the document shows exactly what you want. This step fixes the most common undo complaint, which is pressing the keys too fast and flying past the good version.
Step 3: Check the Edit menu and the toolbar
If the keyboard shortcut does nothing, open the Edit menu at the top of the app and look at the Undo entry. It often names the action it will reverse, such as “Undo Typing” or “Undo Paste,” which tells you what undo is about to fix. If Undo is greyed out, the history is empty, and no shortcut will help. In Microsoft Word and other Office apps, the Quick Access Toolbar at the top has curved Undo and Redo arrows, and clicking the small arrow beside Undo shows a list of recent actions you can jump back to in one move.
Step 4: Look for the app’s own recovery feature
When undo history is gone, the app itself may still hold a copy. In Word and Excel, a Document Recovery pane appears on the left after a crash, with the last autosaved version of your file. In Google Docs, the Version history under the File menu lists every saved version, and you can restore any one of them. In a browser, reopening a closed tab with Ctrl+Shift+T brings back the page, and the form text you typed may still be there. Each app hides its rescue in a different place, so check the File menu before you give up.
Step 5: Check autosave, backup, and the Recycle Bin
If the app offers no recovery pane, look for the file itself. Word and Excel autosave a copy every few minutes by default, and the backup often sits in the same folder as the original, or in the app’s recovery folder. A deleted file may sit in the Recycle Bin, where a right-click and Restore brings it back whole. If the file was saved over with the wrong content, a cloud copy in OneDrive or Google Drive may hold an older version, because both services keep version history for saved files. Only after all five steps fail should you start retyping, and even then, check the clipboard history first, because the text may still be there.
Undo and Redo in Word, Excel, Browsers, and File Explorer
Undo behaves differently in each app, and knowing the differences saves panic. In Microsoft Word, Ctrl+Z walks back through typing, pasting, and formatting, one action at a time, and the history is long, so you can press it dozens of times. In Excel, Ctrl+Z undoes cell edits, pastes, and formatting, but some actions, such as running a macro or deleting a sheet, clear the history or cannot be undone at all. Our guide on the keyboard shortcut for strikethrough excel shows a formatting change that is easy to undo and redo while you work through a sheet.
In a browser, Ctrl+Z undoes typing in a text box, such as an email draft or a comment, but it does not undo navigation, so it will not bring back a closed tab. For that, use Ctrl+Shift+T to reopen the closed tab instead. In File Explorer, Ctrl+Z undoes file moves, renames, and deletions, and it sends a deleted file back from the Recycle Bin, which surprises many users. But if the Recycle Bin has been emptied, File Explorer undo cannot help, and the file is gone unless a backup exists.
| App | Undo shortcut | Redo shortcut | How deep it goes | What it cannot undo |
|---|---|---|---|---|
| Microsoft Word | Ctrl+Z | Ctrl+Y | Dozens of steps | Saving over a file, closing without saving |
| Microsoft Excel | Ctrl+Z | Ctrl+Y | Many steps | Deleting a sheet, running a macro |
| Google Docs | Ctrl+Z | Ctrl+Y | Long, plus version history | Nothing major, versions cover most losses |
| Web browser text box | Ctrl+Z | Ctrl+Y | Typing only | Closing a tab, navigating away |
| File Explorer | Ctrl+Z | Ctrl+Y | Last file action | Emptying the Recycle Bin |
| Adobe Photoshop | Ctrl+Z, Ctrl+Alt+Z | Ctrl+Shift+Z | Many steps with History panel | Flattening layers after saving |
| Notepad | Ctrl+Z | Ctrl+Y | One step only | Anything beyond the last action |
The Photoshop row deserves a note, because it breaks the usual pattern. In Photoshop, Ctrl+Z toggles the last action on and off, while Ctrl+Alt+Z walks back step by step through the History panel. That is different from Word, where Ctrl+Z alone walks back. If you use Photoshop, learn both keys, because pressing Ctrl+Z twice there undoes and then redoes the same action, which looks like nothing happened. The History panel on the right shows every step as a list, and you can click any step to jump straight to it.
How Many Steps Can Undo Walk Back?
The answer depends on the app, and the range is wide. Simple tools like Notepad remember only one step, so a second Ctrl+Z does nothing, and a second mistake is already permanent. Word and Excel remember a long chain, often a hundred steps or more, so you can walk back through a whole morning of edits. Google Docs remembers every change as a version, so undo reaches back much further than most people ever need. The exact number is set by the app, not by Windows, so the only honest rule is to test the app you use most and learn its limit.
Memory is the reason for the limit, because every undo step stores a copy of what changed. A long history of large pastes eats memory, so apps cap the chain to keep the program fast. That cap rarely matters in real work, because most mistakes are caught within a few steps, and the version history in cloud apps covers the rest. But it does matter when you paste a huge block, delete a chapter, and then keep typing for an hour before you notice. By then, the history may have rolled past the mistake, and only a saved backup can help.
The safe habit is to save a version before any risky edit. Press Ctrl+S to save, then make the big change, and if it goes wrong, undo is still there as the first rescue. For a major rewrite, save a copy of the file under a new name first, such as “report v2,” so the original stays safe no matter what undo does. That one habit has saved more documents than any shortcut ever will, because it protects against the one thing undo cannot fix: a save that overwrites good work with bad.

The Recovery Ladder When Undo Does Not Work
Here is the section other guides skip, because it covers the moment undo fails and panic sets in. Work down this ladder one rung at a time, and stop as soon as your text is back, because each step is stronger than the last. Do not retype anything until you have tried every rung, because retyping is the slowest and most error-prone rescue of all.
First, check the clipboard history with Windows+V, because the deleted text may still be there if you copied it earlier. Second, check the app’s autosave and version history, because Word, Excel, Google Docs, and OneDrive all keep older versions of saved files. Third, check the Recycle Bin for a deleted file, and restore it with a right-click. Fourth, check the app’s recovery pane after a crash, because Word and Excel reopen with the last autosaved copy on the left side of the screen.
Fifth, if the PC itself is frozen and no app will respond, the keyboard shortcut to task manager opens the tool that can end the stuck app, and the recovery pane often appears when you reopen the program. Sixth, if the file is truly gone, check your cloud backup, your email sent folder, or any place you pasted a copy of the text, because a second copy hides in more places than people remember. Only when every rung has failed is the text truly lost, and that is rare enough to be worth the climb.
5 Mistakes That Stop Undo From Saving You
These five mistakes wipe out the undo history or make a bad edit permanent, and each one is easy to avoid once you know it. Read the list before your next long writing session, and keep it in mind when you are about to make a big change.
- Typing after the mistake before pressing Ctrl+Z. A new keystroke adds a fresh action to the history, so undo reverses the new typing first. Stop, press Ctrl+Z, and check the screen before you type another word.
- Closing the app without saving, then hoping undo will help. Undo history lives inside the open app, and closing the app usually wipes it. Save first, then close, and rely on version history instead.
- Emptying the Recycle Bin to “clean up” during a crisis. A deleted file in the Bin is recoverable, but an emptied Bin is not, unless a backup exists. Never empty the Bin while you are still looking for a lost file.
- Running a macro or a big find-and-replace without a backup. Some actions clear the undo history in Excel and Word, so the mistake cannot be walked back. Save a copy of the file before any bulk change.
- Pressing Ctrl+Z twenty times in a panic. Fast, repeated presses fly past the good version and remove work you wanted to keep. Press once, look, press again, and use Ctrl+Y to step forward when you overshoot.
Keyboard Shortcut for Undo FAQ
What is the keyboard shortcut for undo?
The keyboard shortcut for undo is Ctrl+Z on Windows and Command+Z on a Mac. Press it once to reverse the last action, and press it again to reverse the one before that. Microsoft lists Ctrl+Z as Undo and Ctrl+Y as Redo in its official Windows shortcuts list (Microsoft Support).
What is the keyboard shortcut for redo?
The keyboard shortcut for redo is Ctrl+Y on Windows and Command+Shift+Z on a Mac. Redo restores the action you just undid, so it walks you forward again after undo walks you back. In some apps, such as Photoshop, the redo keys differ, so check the Edit menu if Ctrl+Y does nothing.
How do I undo in Microsoft Word?
Press Ctrl+Z to undo in Microsoft Word, and press it repeatedly to walk back through many steps. Word remembers a long chain of edits, so you can press Ctrl+Z dozens of times. The Quick Access Toolbar also has an Undo arrow, and clicking the small arrow beside it shows a list of recent actions you can jump back to in one move.
How do I undo in Excel?
Press Ctrl+Z to undo in Excel, just as in Word, and press Ctrl+Y to redo. Excel undoes cell edits, pastes, and formatting, but deleting a sheet or running a macro may clear the history or cannot be undone. Save a copy of the workbook before any bulk change, so a bad edit never costs you the whole sheet.
Why is Ctrl+Z not working?
Ctrl+Z may not work because the undo history is empty, the app does not support undo for that action, or the cursor is not in the app where the mistake happened. Click inside the app first, then press Ctrl+Z, and check the Edit menu to see if Undo is greyed out. If the history is empty, try the app’s version history or autosave instead.
How many times can I press Ctrl+Z?
How many times you can press Ctrl+Z depends on the app. Word and Excel remember dozens of steps, Google Docs remembers every change as a version, and Notepad remembers only one step. The history is capped to save memory, so a very long chain may roll off the oldest steps first. Save versions before big edits to stay safe.
Does Ctrl+Z work in a browser?
Yes, Ctrl+Z works in a browser text box, such as an email draft or a comment field, and it undoes your typing there. It does not undo navigation, so it will not bring back a closed tab. Press Ctrl+Shift+T to reopen a closed tab instead, and use Ctrl+Z only for text you typed inside a page.
Can I undo a file deletion?
Yes, you can undo a file deletion in File Explorer by pressing Ctrl+Z right after the delete, and the file returns from the Recycle Bin. You can also open the Recycle Bin, right-click the file, and choose Restore. But if the Recycle Bin has been emptied, undo cannot help, and only a backup can bring the file back.
What is the undo shortcut on a Chromebook?
On a Chromebook, the undo shortcut is Ctrl+Z, the same as on Windows, and redo is Ctrl+Y. Chromebooks follow the Windows key layout for these shortcuts, because ChromeOS uses Ctrl for copy, paste, and undo. Our chromebook keyboard shortcuts guide lists the full set of combos worth learning on that system.
Does undo work after saving a file?
Undo still works after saving a file, as long as the app is still open, because saving does not clear the undo history. The problem is different: if you saved bad changes over good ones and then closed the app, undo is gone with the app. Cloud apps like Google Docs and OneDrive keep version history, so you can restore the older saved version from there.
How do I undo in Photoshop?
In Photoshop, Ctrl+Z toggles the last action on and off, while Ctrl+Alt+Z walks back step by step through the History panel. Press Ctrl+Alt+Z repeatedly to go back several steps, and use the History panel on the right to jump to any earlier step. Ctrl+Shift+Z redoes a step you just undid in Photoshop.
What should I do when undo cannot bring my text back?
When undo cannot bring your text back, check clipboard history with Windows+V, then the app’s version history or autosave, then the Recycle Bin, and then your cloud backup. Look in your email sent folder or any place you pasted a copy, because a second copy hides in more places than people remember. Only retype after every rescue has failed.
Final Word
The keyboard shortcut for undo is Ctrl+Z, and it is the safety net under every edit you make. Learn it with its partner Ctrl+Y, and you can walk forward and backward through your work until it looks right. The five steps in this guide turn a panicked deletion into a one-minute recovery, and the recovery ladder covers the rare day when undo itself fails.
Make one habit stick: save a version before any big change, and press Ctrl+Z the second you spot a mistake, before you type another word. That pair of habits, plus the shortcuts in this guide, will save more work than any other computer skill you learn. Start today by pressing Ctrl+Z and Ctrl+Y in a practice document, so your fingers know the move before you truly need it.
Read more about undo on Wikipedia: https://en.wikipedia.org/wiki/Undo
