The undo shortcut key is Ctrl + Z on Windows and Command + Z on a Mac. It cancels your last action: typing, deleting, formatting, pasting, even moving a file. Press it again to go back one more step.
Redo brings back what you undid. On Windows that is Ctrl + Y, and many programs also accept Ctrl + Shift + Z. Together these undo and redo shortcut keys let you try things without fear.
Quick facts
Undo
Ctrl + ZRedo
Ctrl + YRedo in many apps
Ctrl + Shift + ZUndo in Office too
Alt + BackspaceMac undo
Command + ZMac redo
Command + Shift + Z
Undo and redo shortcut keys table
| Action | Windows | Mac |
|---|---|---|
| Undo the last action | Ctrl + Z | Command + Z |
| Redo what you undid | Ctrl + Y | Command + Shift + Z |
| Redo, alternative | Ctrl + Shift + Z | Office for Mac also accepts Command + Y |
| Undo, alternative in Office | Alt + Backspace | Not used |
There is a separate guide for redo with the repeat trick in Word and Excel: redo shortcut key.
How to use the undo shortcut key
- Notice the mistake: wrong text deleted, wrong format, wrong paste.
- Press Ctrl + Z once. The last action is reversed.
- Still not right? Press it again for each earlier step.
- Went back too far? Press Ctrl + Y to step forward again.
Undo works in order, from newest to oldest. You cannot undo only the third step without also undoing the two after it.
Undo in File Explorer
Ctrl + Z also works on files. Straight after you rename, move, copy or delete files in File Explorer, pressing it reverses that action: the old name returns, the moved file goes back, and deleted files come back from the Recycle Bin. It does not bring back files deleted with Shift + Delete, which skips the bin. See the rename and delete guides.
How many times can you undo
| Program | What to know |
|---|---|
| Word | Many steps, until you close the document |
| Excel | Usually the last 100 actions; running a macro clears the list |
| Notepad | Several steps in Windows 11; older Notepad undid one step |
| Browsers | Typing in a text box can be undone until you leave the page |
| After saving and closing | The undo list is gone in every program |
Undo shortcut key in computer and laptop keyboards
The undo keyboard shortcut is the same on every laptop and desktop: Ctrl is bottom left and Z is next to Shift, so you can press it with one hand. In Hinglish searches it shows up as "undo ka shortcut key" and the answer does not change. Learn it with its neighbours Ctrl + X, Ctrl + C and Ctrl + V, which sit in the same row; the Ctrl A to Z table has the full set.
When undo does not work
| Problem | Fix |
|---|---|
| Nothing is undone | Click inside the document first so it has focus |
| Undo is greyed out | There is nothing left to undo, or the file was just opened |
| File change cannot be undone | Too many other actions since; restore from Recycle Bin instead |
| Undo undid the wrong thing | Press Ctrl + Y to redo it |
Undo on a Mac
Press Command + Z to undo and Command + Shift + Z to redo in most Mac apps. In Finder, Command + Z also undoes moving or renaming a file. See the Mac undo and redo guide for app differences.
Frequently asked questions
What is the shortcut key for undo?
What are the undo and redo shortcut keys?
Undo is Ctrl + Z and redo is Ctrl + Y on Windows.
What is the shortcut key of undo, and can I use it more than once?
Yes. Each press of Ctrl + Z goes back one more step.
Can I undo a file I deleted?
Yes, straight away with Ctrl + Z in File Explorer, or restore it from the Recycle Bin.
Why does Ctrl + Z not work after I closed the file?
The undo list is cleared when you close a document.
What is the redo undo shortcut key on a Mac?
Undo is Command + Z and redo is Command + Shift + Z.