How to clean a keyboard without damaging it
Unplug it, tip out the crumbs, blow, wipe with a barely damp cloth, then test every key: a keyboard gets clean in about fifteen minutes without taking it apart.
Page updated November 26, 2026.
Test it now: Keyboard tester
The method in 6 steps
- Power down and unplug: Turn off the computer and unplug the keyboard, or take out its batteries. On a laptop, shut it down and unplug the charger. Never clean a keyboard that is powered.
- Turn it over and tap: Hold the keyboard upside down over a clean surface and tap it gently so crumbs and dust fall out. Do not shake it hard: keys and contacts are fragile.
- Blow out the dust: Use a soft brush and clean air, either a hand blower or a can of compressed air used as its label says. Keep the can upright: tilting it can spray liquid.
- Wipe the keys: Barely dampen a soft, lint-free cloth with isopropyl alcohol or mild soapy water. Never apply liquid straight to the keyboard. Wipe the keys, then let everything dry completely.
- Clean between the keys: Run a barely damp cotton swab through the gaps. If your keyboard has removable keycaps, the manufacturer's guide often explains how to take them off. Follow it, and do not force anything.
- Test every key: Plug it back in and open the keyboard test. Press each key: any that does not light up needs another look. See also keyboard key not working.
Why clean a keyboard
Dust, crumbs, hair and skin oil build up under the keys. They can make a key stick, keep it from springing back or interfere with the contact. Regular cleaning prevents many imaginary failures: a dead key is often just a dirty one.
Check the manufacturer's advice first
Keyboards differ a lot. A mechanical keyboard with removable keycaps, a thin laptop keyboard and a membrane desktop keyboard are all cleaned a little differently. Look for the care instructions from the maker of your keyboard before you start. The steps above are general good practice, not a single official procedure, and where the manual disagrees, follow the manual.
What to avoid
- Too much liquid. Do not pour or spray anything onto the keyboard. Liquid that reaches the electronics can ruin it.
- Harsh chemicals. Strong solvents can wear off the printed letters or attack the plastic.
- A full-power vacuum. It can pull off keycaps or suck up small parts. A small, low-power desk vacuum is gentler.
- Taking a laptop keyboard apart without a guide. The key mechanisms are often delicate.
- The dishwasher. You may see this tip online for loose keycaps from mechanical keyboards. It does not suit every model, so read the manufacturer's advice first.
How often
There is no official schedule. A quick pass with a soft brush now and then is enough for normal use. Do a fuller clean when a key sticks, when you see dirt, or after something spills.
After a spill
Unplug everything right away and turn the keyboard upside down so the liquid can drain. Let it dry for a long time before plugging it back in. On a laptop, shut it down immediately and have it checked. Sugary drinks leave a residue that makes keys sticky, so you may need a more careful clean afterward.
Tools worth having
A soft brush, a hand blower or a can of compressed air, a few lint-free cloths, cotton swabs and a bottle of isopropyl alcohol cover almost every case. You do not need special kits. If you own a mechanical keyboard and want to pull the keycaps, a keycap puller made for the job is safer than a screwdriver, and taking a photo of the layout first saves you from guessing where each cap goes back.
Cleaning a laptop keyboard
A laptop keyboard is more delicate than a desktop one, and liquid can reach the parts underneath. Use only the lightest touch: a soft brush, a short burst of air and a barely damp cloth on the surface. If keys are still sticky afterward, a repair shop can open it safely. Do not pry off keys unless the maker's guide says that is possible for your model.
Keeping it hygienic
For a shared keyboard, use a wipe made for electronics, or a cloth barely moistened with isopropyl alcohol, and keep to the manufacturer's care guide.
What the test tells you
After cleaning, the test shows the keys you have not pressed yet and how many keys it detects at once. That second number says something about your keyboard's rollover, which matters if you play games. If a key still fails after cleaning and a reconnect, the problem is probably hardware. If the wrong characters appear, see keyboard typing wrong characters, and for a broader checklist see how to troubleshoot a device.
Sources and updates
- Care advice: check your keyboard maker's guide; the products and precautions listed are general good practice, not read from one single source (read Nov 26, 2026).
- MDN, KeyboardEvent.code : how the test reads the keys (read Nov 26, 2026).
Page checked on November 26, 2026. Spotted an error? Tell us on the contact page.
Frequently asked questions
Can I use water to clean a keyboard?
Only a tiny amount on a barely damp cloth, never straight on the keyboard. Let it dry fully before you plug it back in.
How do I know a key is really dead after cleaning?
Press it in the keyboard test. If it does not light up, even after a reconnect, the fault is in the hardware.
Is compressed air safe for keyboards?
Generally yes if you keep the can upright and follow its instructions. A hand blower is a gentler alternative.
How often should I clean my keyboard?
There is no fixed rule. A quick brush now and then is enough, and a deeper clean helps when keys stick or after a spill.
Try the test online
More guides
- How to set up your mic for video calls
- Webcam lighting and framing: 6 steps
- How to choose a controller for PC
- How to check a new monitor: 6 tests
- How to type faster: 6 steps to a higher WPM