How to Clean a Keyboard Without Damaging It
A keyboard collects dust, crumbs, skin and hair in the gaps around every switch, and the first symptom is rarely dirt you can see. It is a key that needs a harder press than its neighbors, or one that fires twice from a single tap, the kind of fault someone who types without looking at the keyboard notices long before anyone glancing at the screen does. Compressed air and a lightly damp lint-free cloth fix most of it, and the 70 percent alcohol that every guide leads with turns out to answer a different question.
What does the manufacturer actually allow?
The internet answer and the documented answer differ, and they differ in the direction most guides get backwards. Apple publishes one cleaning page covering its keyboards, with two separate instructions depending on what you are doing.
| Job | What Apple documents for a keyboard |
|---|---|
| Routine cleaning | Power off or unplug, remove the batteries, then wipe the outside with a lint-free cloth lightly moistened with water |
| Disinfecting | A 70 percent isopropyl wipe, a 75 percent ethyl alcohol wipe, or Clorox Disinfecting Wipes, on hard nonporous surfaces, keyboard named explicitly |
| Cloth | Soft and lint-free; abrasive cloths, towels and paper towels ruled out |
| Application | Never spray a cleaner directly onto the item |
| Ruled out | Aerosol sprays, bleaches, abrasives, and anything containing hydrogen peroxide |
| Openings | Keep moisture out of every opening |
Two things follow for a keyboard that is not an Apple one. Water comes first, and where a maker does name alcohol for a keyboard the figure is 70 percent isopropyl, a documented number rather than the 70 to 99 range review sites repeat.
The second is that a can of compressed air is not the aerosol being warned about: that ban sits in a list of cleaning products, and the same page recommends compressed air on a mouse sensor lower down.
Disconnect before you touch anything
Unplug a wired keyboard. Switch off a wireless one and take the batteries out if it has them. For a laptop, shut the machine down completely rather than closing the lid, because a sleeping laptop still has power on the keyboard matrix. Photograph the board from above before anything comes off: it is the only reliable map back.
Get the loose debris out first
Tilt the keyboard upside down over a bin and tap the back firmly. A surprising amount falls straight out, and removing it before any moisture arrives stops crumbs turning into paste.
Then use compressed air, where two details decide whether it helps or hurts.
- Hold the nozzle at an angle, roughly forty five degrees to the surface, and blow along the rows so debris travels sideways and out. Spraying straight down drives it deeper under the switches.
- Keep the can upright and use short bursts. Tipping it, or holding the trigger down, expels liquid propellant instead of gas. What is in the can is a liquefied gas, HFC-152a or HFC-134a, boiling below minus twenty four degrees Celsius, so a drop that lands on a key chills the plastic in one spot and leaves a mark.
Should you take the keycaps off?
On a mechanical keyboard, yes. The caps are designed to come off, and it is the only way to reach what has settled on the plate. Pull each one straight up with a wire or plastic puller, never at an angle, and take extra care with the long stabilized keys, spacebar, Enter, Shift and Backspace, because they sit on separate mechanisms that have to be re-seated correctly. Removed caps wash in warm water with a little dish soap, then dry for several hours; never put them back damp.
On a laptop, no. Those keys sit on thin scissor or butterfly mechanisms whose plastic clips break on removal, and a single cap is rarely orderable on its own. Clean around them, not under them.
Wiping the surfaces
Moisten a microfiber cloth or a cotton swab and work with that. Never wet the board: Apple puts it as not spraying a cleaner directly onto the item. Damp, not wet. Wipe the tops of the keys, then the plate between them, then a swab for the corners, and let the board dry fully before reconnecting it.
Two cautions sit on top of that. Whether alcohol lifts a legend depends on how the legend was made. A printed one sits ON the surface of the cap and can come off; on a doubleshot cap the character is a separate piece of plastic molded right through, and no amount of rubbing touches it. Test one key in a corner first and drop back to plain water if the print smears. And keep alcohol out of the switch housings on a mechanical board, because it strips the factory lubricant from the stem.
Membrane and mechanical boards behave differently
A membrane keyboard sits on a sealed rubber sheet under all the keys. It shrugs off small spills, but once anything gets past the sheet there is no cleaning it, and the caps are usually not meant to come off. Treat it as a surface clean with air underneath.
A mechanical keyboard is more open. Debris reaches the plate easily, which also makes it easy to clean and a single switch replaceable on a hot swap board, and it means a spill runs straight to the board.
If you spill liquid
Speed matters more than technique.
1. Unplug or power off immediately and remove the batteries. 2. Turn the keyboard upside down so liquid drains out rather than pooling on the board. On a laptop, tilt it open and inverted like a tent. 3. Do not press the power button to check whether it still works. Wet contacts plus power is the one combination to avoid, and it is the moment you control, so postpone it until the board is dry. 4. Blot what you can reach and leave the board inverted somewhere warm and dry for twenty four to forty eight hours. Moving air helps; a hot hair dryer does not, because heat warps the plastics.
Sugary drinks leave a sticky film, so a board that works but feels tacky needs the caps off and the plate wiped with distilled water, then alcohol, then a full dry.
When cleaning is not the answer
A key that fails in one layout and works in another was never dirty. That is a dead key doing its job, and the check takes two presses rather than an evening with a puller, described in dead keys explained.
A key that has needed a harder press since the day the board arrived is a switch, not a deposit. Cleaning helps a key that got worse, not one that was always like that.
And on a membrane board the contact layers sit under a seal you cannot open cleanly, so a key that went silent after a large spill is usually the end of that keyboard.
Test the keys before you trust the keyboard
Cleaning is when keys get knocked loose, seated crookedly, or left pressed under a misaligned cap. Run the keyboard test and sweep every key in order, modifiers and number pad included.
Watch for three things: a key that never registers, a key shown as held down when nothing is touching it, and a key that fires twice from one press. Any of those means going back in, usually to re-seat a keycap or a stabilizer.
FAQ
Do I need alcohol to clean a keyboard at all?
For dirt, no. Apple’s routine instruction for a keyboard is a lint-free cloth lightly moistened with water. Alcohol answers a different question, which is disinfecting rather than cleaning, and that is where the figure below comes from.
What strength of isopropyl alcohol should I use on a keyboard?
70 percent, or a 75 percent ethyl alcohol wipe. Those are the figures Apple names for wiping hard nonporous surfaces of its products with the keyboard listed explicitly, and the same 70 percent appears in its instructions for the Magic Keyboard. Higher strengths are sold for electronics work, but 70 percent is the number with a manufacturer instruction behind it, and the 70 to 99 range repeated across review sites has none.
Can I spray cleaner onto the keyboard?
No. Apply it to the cloth or the swab instead. Spraying puts liquid into the openings between the keys, which is the exact route to the contacts, and it is ruled out in the manufacturer instructions rather than being a matter of preference.
Is compressed air safe for a keyboard?
Yes, held upright and used in short bursts at an angle. Apple’s own page tells you to clean a mouse sensor with compressed air, so it is not what the warning about aerosol sprays refers to. Tip the can and you get liquid instead of gas, at the temperature given above.
Can I put keycaps in the dishwasher?
No. Heat warps thin caps and the detergent reaches printed legends. Warm water, a drop of dish soap, a rinse and several hours of drying does the same job with nothing at risk.
How long does a keyboard need to dry after a spill?
Twenty four to forty eight hours, inverted, somewhere warm with air moving. The temptation to power it up early is what turns a survivable spill into a dead board.
A passage worth typing on a clean board
Kenneth Grahame opens The Wind in the Willows, published in 1908, with the Mole spring cleaning his own house from top to bottom, and those 498 characters are the obvious thing to type once the brushes are put away. It is waiting in the typing test, with author, year and source on its own page.
Sources, checked on August 17, 2026: Apple, How to clean your Apple products. Propellant boiling points checked on August 21, 2026 in the NIST Chemistry WebBook: HFC-152a boils at 248.4 K, that is minus 24.7 degrees Celsius, and HFC-134a at 246.6 K.

