How to clean a keyboard
Test every key below, then unplug the keyboard and wipe it with a cloth damp with 70% isopropyl alcohol. Test again once it is dry.
Before you start
On the computer the keyboard plugs into, press every key in the test at the top and note the keys that stay dark: cleaning often brings them back.
Then unplug the keyboard. Switch a wireless one off and take out its batteries. Shut down a laptop and unplug the charger.
How to clean a keyboard, step by step
- Shake. Turn the keyboard upside down and tap it gently to drop the crumbs.
- Blow. Use compressed air in short bursts, can upright, sweeping between the rows of keys from one side to the other.
- Wipe. Dampen a microfiber cloth with water or 70% isopropyl alcohol, wring it out, and wipe the keys and the frame. Never spray or pour onto the keyboard.
- Edges. Run a cotton swab barely damp with alcohol along the sides of each key.
- Dry. Wait a few minutes for the alcohol to evaporate, then plug the keyboard back in.
How to clean a mechanical keyboard
- Take a photo of the keyboard, so you know where each keycap goes.
- Pull the keycaps straight up with a keycap puller. Go gently on the spacebar, Enter, Shift and Backspace: they sit on a metal wire that has to clip back in.
- Soak the keycaps in warm soapy water, brush them with an old toothbrush, rinse, and let them dry completely, overnight if you can. No dishwasher: the heat can warp them.
- Clean the plate with compressed air and a soft brush. Leave the switches in place, even on a hot-swap keyboard, and never wet them: wipe around them with a swab barely damp with alcohol.
- Put the keycaps back, pressing each one straight down until it clicks in.
How to clean a laptop keyboard
Laptop keys sit on small plastic clips that break easily. Do not pry the keys off to clean under them. Hold the laptop open and tilted almost upright, and blow compressed air across the keys from one side to the other, then wipe them with a cloth lightly damp with 70% isopropyl alcohol. A MacBook cleans the same way.
If one key really has to come off, follow the maker's repair guide for that model.
How to disinfect a keyboard
Use 70% isopropyl alcohol wipes, or a cloth dampened with it and wrung out. Wipe every key and leave it wet for a short moment before it dries. Skip bleach, glass cleaner and kitchen sprays: they can fade the letters and damage the coating.
After a spill
Unplug the keyboard right away, or shut the laptop down. Turn it upside down to drain and wipe what you can reach. Water only: let it dry fully, at least a full day, before you plug it in. Coffee, soda or juice leave sugar that makes keys stick: pull the keycaps of a mechanical keyboard and clean under them with alcohol. A laptop that took a sweet drink is safer at a repair shop.
Test every key
Plug the keyboard back in and press every key in the test at the top, until every key of your keyboard is green. A laptop or compact keyboard never fills the counter: the drawing has 104 keys. A key still dark after cleaning needs more than a clean: see keyboard keys not working. If no key responds at all, read keyboard not working.
Your screen is next: how to clean a monitor.
FAQ
Can I clean my keyboard with water?
Only with a cloth that is damp, never wet. Keycaps pulled off a mechanical keyboard can go in soapy water; the keyboard itself never should.
Can I put keycaps in the dishwasher?
Better not. The heat can warp them and fade the letters. Warm soapy water and a toothbrush do the job.
How often should I clean my keyboard?
Wipe it every week or two, and do a deep clean every few months, or right away after a spill.
Is compressed air safe for a keyboard?
Yes. Keep the can upright and use short bursts, so no cold liquid comes out.
Related tools
More guides
Add this tool to your site
Free for any website. Paste this code into an HTML block where the tool should appear.