How to clean a keyboard safely, laptop or desktop
How to clean a keyboard, from crumbs to a spilled drink, using the steps Apple, Microsoft and Lenovo publish for their own keyboards, plus what never to use.
To clean a keyboard, disconnect it or shut the computer down, turn the keyboard upside down and tap out loose debris, blow between the keys with compressed air, then wipe the keys with a soft, lint-free cloth that is only lightly damp. Never pour or spray liquid onto a keyboard.
That is the short version, and it is what Apple and Microsoft tell owners of their own keyboards. The rest of this article covers laptop and external keyboards separately, what to do after a spill, what not to use, and how to check every key afterwards. Where the makers' advice differs, it says so.
Before you start
- Cut the power. Unplug a wired keyboard, or switch off a wireless one and remove its batteries if it has them. For a laptop, shut it down and unplug the power adapter and any cables. Apple and Microsoft both make this the first step.
- Gather what you need. A soft, lint-free cloth, cotton swabs, a can of compressed air with its straw, and mild soap and water. Isopropyl alcohol at 70% or less, or alcohol wipes, if you also want to disinfect.
- Check your maker's care page. The steps below come from Apple, Microsoft and Lenovo. Fabric surfaces and some coatings need different treatment, and your own maker's page is the authority for your model.
How to clean an external keyboard
These are Microsoft's steps for its own mice and keyboards. They suit most desktop keyboards.
- Disconnect it. Unplug it, or remove the batteries if it is wireless.
- Shake out loose dirt. Hold the keyboard upside down and tap it gently to let crumbs and debris fall out.
- Blow out the gaps. Use compressed air to blow dust and debris from the surface and from between the keys. Microsoft also suggests a dusting brush on a vacuum, used lightly across the top.
- Wipe the keys. Lightly dampen a lint-free cloth or a cotton swab with mild soap and water, and wipe the keys and the surface gently. Take care not to drip water into the keyboard.
- Disinfect, if you want to. Put an isopropyl alcohol solution of 70% or less on a soft, lint-free cloth and wipe the device with it.
- Let it dry fully before you reconnect it.
Microsoft's advice is to clean "monthly or whenever needed."
How to clean a laptop keyboard
A laptop keyboard sits directly on top of the computer's electronics, so moisture is a bigger risk than with a separate keyboard.
Shut the laptop down and unplug the power adapter and all cables. Apple says to do this before cleaning any Mac laptop.
Blow out debris with compressed air. Apple's method for MacBook and MacBook Pro keyboards with unresponsive keys is:
- Hold the laptop at an angle of about 75 degrees, so that it is not quite vertical.
- Spray the keyboard, or just the affected keys, with compressed air, moving from left to right.
- Turn the laptop onto its right side and spray left to right again.
- Turn it onto its left side and repeat.
Use the straw that comes with the can, keep its end about 1.5 cm from the keys, and do not turn the can upside down while you spray.
Wipe the keys and the palm rest with a soft, lint-free cloth. Apple allows a 70 percent isopropyl alcohol wipe or a 75 percent ethyl alcohol wipe on the hard, nonporous surfaces of its products, which includes the keyboard, and it warns against excessive wiping.
Keep moisture out of the openings. Wring any cloth until it is barely damp, and do not let liquid run between the keys.
If keys still do not respond after cleaning, Apple's advice is to take the laptop to its service. For any laptop under warranty, contact the maker before opening it up.
Surface keyboards and Type Covers
Microsoft's care page for Surface keyboards and Type Covers says to wipe them with a lint-free cloth dampened with mild soap and water, at about five parts water to one part soap. Use a cloth with a small amount of isopropyl alcohol only for the spine and magnetic connections. Alcantara fabric covers have separate care steps on the same page, including dealing with spills within 30 minutes so stains do not set.
What not to use on a keyboard
| Avoid | Who warns against it |
|---|---|
| Pouring or spraying liquid directly onto the keyboard | Microsoft |
| Getting moisture into any openings | Apple, Microsoft |
| Submerging the keyboard in any cleaner | Apple |
| Bleach, or cleaners containing hydrogen peroxide | Apple, Microsoft |
| Aerosol sprays aimed at the device | Apple, Microsoft |
| Glass cleaner or other chemical cleaners | Microsoft, for Surface devices |
| Abrasive cleaners and abrasive cloths | Apple |
| Paper towels and ordinary towels | Apple |
| Excessive wiping | Apple |
| Turning the compressed air can upside down | Apple |
Note the difference in alcohol advice. Microsoft limits isopropyl alcohol to solutions of 70% or less, applied to a cloth. Apple names 70 percent isopropyl alcohol wipes and 75 percent ethyl alcohol wipes. Neither tells you to put alcohol straight onto the keys.
What to do if you spill on a keyboard
Act quickly. Lenovo's user guides give these steps for a spill on a laptop:
- Unplug the AC adapter and switch the computer off immediately. Lenovo explains that the sooner the current stops, the better the chance of limiting short-circuit damage, even if you lose unsaved work.
- Do not turn the laptop over to drain it. On models with drainage holes in the bottom, the liquid drains out through them.
- Wait until the computer is completely dry before you turn it on again.
Advice on turning the machine over differs between sources, so for a laptop follow your maker's own guide. For a separate keyboard, disconnect it first, then follow Microsoft's cleaning steps above once it is dry.
Sugary or sticky drinks leave residue that can keep keys from moving freely after the liquid has dried. If keys stick, repeat, or type by themselves after a spill, or if the laptop does not start, contact the maker or a repair service rather than switching it on again and again. Keyboard not working has more on what a spill can do and how to narrow down the fault.
Check every key after cleaning
Once the keyboard is dry and reconnected, open the keyboard tester and press every key once, row by row, including both Shift, Ctrl and Alt keys, the function row and the number pad. Each key should light up when you press it and go dark when you let go.
| What you see | What it means |
|---|---|
| Every key lights up and releases | Clean and working |
| A key never lights up | Debris still under it, or a fault that cleaning will not fix |
| A key stays lit or repeats | Something is holding it down, often sticky residue |
| Keys fail only when pressed together | Usually a rollover limit, not dirt; see key rollover and ghosting |
Then type for a minute on the typing test or the online typewriter. A key that registers once in the tester can still miss at typing speed, and a short run of real typing will show it.
Sources
- How do I clean my Microsoft mouse or keyboard?, Microsoft Support
- Clean and care for your Surface, Microsoft Support
- How to clean the keyboard of your MacBook or MacBook Pro, Apple Support
- How to clean your Apple products, Apple Support
- What should I do if I spill liquid on the computer, Lenovo user guide
Questions people ask
- How do I clean my keyboard without damaging it?
- Disconnect it or switch it off, turn it upside down and tap it gently, blow out the gaps with compressed air, then wipe the keys with a soft, lint-free cloth that is only lightly damp. Never pour or spray liquid onto the keyboard, and never submerge it.
- Can I use rubbing alcohol on a keyboard?
- On a cloth or wipe, usually yes. Microsoft says an isopropyl alcohol solution of 70% or less on a soft, lint-free cloth is safe for its keyboards. Apple allows 70 percent isopropyl alcohol wipes on the hard, nonporous surfaces of its products. Check your own maker's guidance, as some surfaces, such as fabric, need different care.
- What should I do if I spill a drink on my laptop keyboard?
- Unplug the power adapter and switch the laptop off straight away. Lenovo's guides say not to turn the laptop over to drain it, because models with drainage holes drain through the bottom. Do not switch it on again until it is completely dry, and contact the maker or a repair service if keys still misbehave.
- How often should I clean my keyboard?
- Microsoft suggests cleaning its keyboards monthly or whenever they need it. A keyboard that is shared, or used while eating, may need it more often.
- How do I check that every key works after cleaning?
- Open a keyboard tester in your browser and press every key once. Each key should light up when pressed and go dark when released. A key that never lights up, or stays lit, needs another clean or a repair.