How to Clean a Keyboard in 6 Steps
Disconnect, tap out crumbs, blow out the gaps, wipe with a lightly damp cloth and disinfect with the alcohol strength your maker allows. Laptop, wireless and mechanical keyboards.
To clean a keyboard, power it off and disconnect it, turn it upside down and tap out loose crumbs, blow out the gaps between keys with compressed air, then wipe the keys with a lint-free cloth that is only lightly damp. For disinfecting, put the cleaner on the cloth, never on the keyboard, and use the alcohol strength your keyboard’s maker allows. If you have a mechanical keyboard with removable keycaps, you can pull the caps and wash them separately in warm soapy water.
This is a research-based guide built from the manufacturers’ own care instructions, mainly Apple, Microsoft, Logitech, Corsair and Lenovo, plus the CDC’s advice for cleaning electronics. Makers do not all agree on what alcohol strength is safe, so the steps below show where they differ and why your own keyboard’s manual should have the final word.
What You Need
- A soft, lint-free cloth (microfiber works well)
- A can of compressed air with its straw attached
- Mild dish soap and water
- Cotton swabs for the edges of keys
- Isopropyl alcohol or a disinfecting wipe, only in the strength your keyboard maker allows
- A keycap puller, if you have a mechanical keyboard and want to deep clean it
How to Clean a Keyboard in 6 Steps
These steps work for a separate desktop keyboard and, with the cautions noted, for a laptop keyboard.
1. Power off and disconnect the keyboard
Microsoft’s instruction is to always disconnect the device, or remove the batteries if it is wireless, before you clean it. Logitech adds that you should switch the device off and wait 5 to 10 seconds before you start. For a laptop, Apple says to shut down the computer and unplug the power adapter first. Cleaning a laptop while it is running also means every wipe types characters into whatever window is open.
2. Turn it over and tap out loose debris
Microsoft recommends turning the keyboard upside down and tapping it gently to shake out loose crumbs and dust. Do this over a trash can or a sheet of paper. With a laptop, hold it carefully by the base and do not shake it hard.
3. Blow out the gaps with compressed air
Both Microsoft and Logitech suggest compressed air to clear dust and debris between the keys. Logitech notes that if you do not have a can, the cold setting on a hair dryer is an alternative. Apple’s instruction is to keep the can upright while you spray and not to tilt or turn it upside down.
For MacBook (2015 and later) and MacBook Pro (2016 and later) keyboards, Apple gives a specific method for keys that stick or feel different:
- Hold the laptop at about a 75-degree angle, leaning back but not fully upright.
- Use the straw that came with the can and keep its tip about half an inch from the keys.
- Spray the whole keyboard, or just the affected keys, moving left to right.
- Turn the laptop onto its right side and spray left to right again, then repeat on its left side.
Apple says that if keys still do not respond after this, you should take the laptop to an Apple Store or an Apple Authorized Service Provider.
4. Wipe the keys with a lightly damp cloth
Logitech’s instruction is to lightly moisten a soft, lint-free cloth with regular tap water and gently wipe the keys. Microsoft suggests a cloth or cotton swab lightly dampened with mild soap and water, and for Surface keyboards and Type Covers it gives a ratio of five parts water to one part mild soap. Wring the cloth out well. Every maker in this guide warns against letting liquid drip into the keyboard.
Use a cotton swab for grime around the edges of each key. For shiny spots or oily residue on a Surface keyboard, Microsoft says a dry melamine sponge or a coarse dry paper towel can help. Logitech also lists a melamine sponge as an option for stubborn dirt, but suggests testing any stronger method on a hidden area first.
5. Disinfect with the right cleaner, on the cloth
Keyboards are high-touch surfaces, and the CDC’s guidance for electronics is simple: follow the manufacturer’s instructions. That matters here because the makers do not give the same answer.
| Maker | What it allows on keyboards | How to apply |
|---|---|---|
| Apple | 70% isopropyl alcohol wipes, 75% ethyl alcohol wipes or Clorox Disinfecting Wipes on hard, nonporous surfaces | Wipe gently; do not get moisture in openings or submerge the product |
| Microsoft | Isopropyl alcohol solution of 70% or less | Apply to a soft, lint-free cloth, not the keyboard |
| Logitech (general cleaning page) | Fragrance-free disinfecting wipes, fragrance-free antibacterial wipes, makeup-removing tissue, or alcohol swabs with less than 25% alcohol | Spray or wet the cloth, never the device; never submerge |
Logitech’s separate sanitization article mentions isopropyl alcohol for keyboards without giving a strength, and its general cleaning page says rubbing alcohol can be used with more pressure if a device still is not clean, after testing it on an inconspicuous spot for discoloration or lost printing. Because the advice varies, use the lowest-risk option your keyboard’s own maker lists. If a keyboard has printed legends or a soft-touch coating, test first on a key you rarely use.
Whatever you use, put it on the cloth first, wipe the keys and frame, and let the keyboard dry fully before you reconnect it.
6. Deep clean removable keycaps (mechanical keyboards)
Most mechanical keyboards let you pull the keycaps off, which makes a much deeper clean possible. Corsair’s guide describes the process:
- Use a keycap puller: press it straight down onto the keycap until both sides catch under the edges, then lift. Corsair calls the puller technically optional, but prying caps off with other tools can scratch them.
- Drop the caps in a bowl of hot, but not boiling, water mixed with ordinary dish soap, stir them and leave them to soak while you clean the board.
- Clean the exposed board with cotton swabs, which are less likely than paper towels to leave fragments behind. A swab or paper towel dampened with isopropyl alcohol helps with dried residue.
- Leave the caps to air-dry, or spread them on paper towels. Corsair says a hair dryer on low can speed this up if you are careful not to blow the caps around.
Take a photo of the layout before you pull anything so you can put every key back in the right place, and make sure the caps are completely dry before they go back on. Take larger keys such as the space bar, Shift and Enter off slowly and gently. Do not try to pry keys off a laptop unless its manufacturer’s manual explains how, because laptop key mechanisms are small and easy to break.
Laptop, Desktop and Mechanical Keyboards Compared
| Keyboard type | Before you start | Main cleaning method | Main caution |
|---|---|---|---|
| Laptop keyboard | Shut down and unplug the power adapter | Compressed air, then a damp lint-free cloth; Apple’s 75-degree method for MacBooks | Liquid can reach the rest of the computer; do not remove keys unless the manual allows it |
| Wired desktop keyboard | Unplug the cable | Tap out debris, compressed air, damp cloth | Do not drip liquid between keys |
| Wireless keyboard | Switch off and remove replaceable batteries | Tap out debris, compressed air, damp cloth | Keep moisture away from the battery compartment and charging port |
| Mechanical keyboard | Unplug; photograph the layout | Pull keycaps and wash them in warm soapy water; clean the plate with swabs | Caps must be fully dry before refitting; never put the board itself in water |
What Not to Use on a Keyboard
- Bleach and hydrogen peroxide. Apple says not to use products containing them, and Microsoft rules out disinfectants with chlorine, bleach or hydrogen peroxide for Surface devices.
- Acetone, nail polish remover, strong solvents and abrasives. Logitech lists all of these as things to avoid and says damage caused by them is out of warranty.
- Glass cleaner and other chemical cleaners. Microsoft says never to use them on Surface devices.
- Sprays aimed at the keyboard. Apple says not to use aerosol sprays, and Microsoft and Logitech both say to apply liquid to the cloth rather than the device.
- Soaking the keyboard. Logitech says never to submerge a device in any liquid, and Apple says not to submerge its products in cleaning agents. Only removable keycaps, separated from the board, should go in water.
What to Do If You Spill on Your Keyboard
Speed matters most. Lenovo’s guidance for its laptops is to unplug the AC adapter and turn the computer off immediately. You may lose unsaved work, but leaving it running risks a short circuit that could make the computer unusable. Lenovo also says not to try to drain the liquid by turning the computer over, since models with keyboard drainage holes let liquid out through the bottom. Then wait until you are certain the liquid has completely dried before you turn it back on.
For a separate keyboard, unplug it or remove its batteries right away and let it dry fully before reconnecting. If keys stay sticky or stop working after a spill, contact the manufacturer or a repair shop rather than opening the keyboard yourself, especially if it is still under warranty.
How Often Should You Clean a Keyboard?
There is no single schedule. Logitech recommends cleaning on a regular basis, daily, weekly or monthly, and says this matters most for light-colored devices. Its keyboard care article suggests a weekly clean to stop stains from becoming hard to remove, and it advises avoiding snacks with high pigment or grease, such as chips and sweets, while typing. Microsoft says to clean Surface keyboards often to keep them working well. A practical routine for a home office is a quick shake and wipe each week and a deeper clean with compressed air and disinfecting every month or so, more often if the keyboard is shared.
A tidy desk makes this easier. Our guide to home office organization ideas covers keeping food and drinks out of the work zone, and the steps in how to set up a home office include where to place the keyboard so it stays clear of spills. If you are cleaning a gaming setup, our gaming mouse guide covers the other device your hand touches all day.
Frequently Asked Questions
Can I use rubbing alcohol on my keyboard?
Usually, but check the strength your keyboard’s maker allows. Apple allows 70% isopropyl alcohol wipes, and Microsoft allows isopropyl solutions of 70% or less. Logitech’s general cleaning page lists alcohol swabs with less than 25% alcohol for routine disinfecting and suggests testing stronger rubbing alcohol on a hidden spot first. Always apply it to a cloth, not the keyboard.
Can I clean a keyboard with water?
Yes, but only on a cloth that is lightly damp. Logitech recommends tap water on a lint-free cloth and Microsoft suggests mild soap and water. Do not pour water on the keyboard or let it drip between the keys.
Is it safe to use compressed air on a laptop keyboard?
Apple gives compressed air instructions for MacBook (2015 and later) and MacBook Pro (2016 and later) keyboards, so it is a manufacturer-approved method for those models. Keep the can upright, use the straw and hold it about half an inch from the keys. For other laptops, check the manufacturer’s manual.
Can I put keycaps in the dishwasher?
None of the manufacturer guides used for this article recommend it. Corsair’s method is soaking the caps by hand in hot, not boiling, soapy water and letting them air-dry. Hand washing avoids the high heat of a dishwasher.
How do I clean under the keys without removing them?
Use compressed air to blow debris out from the gaps, then work around the edge of each key with a cotton swab that is barely damp. On a MacBook, follow Apple’s angled method described in step 3.
Conclusion
Cleaning a keyboard safely comes down to three habits: disconnect it first, keep liquid on the cloth and off the keyboard, and follow your manufacturer’s rules on alcohol strength. A weekly shake and wipe keeps grime from building up, compressed air takes care of the gaps, and mechanical keyboards can get a full keycap wash when they need it. If you spill on a laptop, switch it off at once and let it dry fully before trying it again.
Sources
- Apple Support, How to clean the keyboard of your MacBook or MacBook Pro. support.apple.com/en-us/102365
- Apple Support, How to clean your Apple products. support.apple.com/en-us/HT204172
- Microsoft Support, How do I clean my Microsoft mouse or keyboard? support.microsoft.com
- Microsoft Support, Clean and care for your Surface. support.microsoft.com
- Logitech Support, Cleaning your Logitech device. support.logi.com
- Logitech Support, Does Logitech have any advice on sanitization of mice, keyboards and headsets? support.logi.com
- Logitech Support, Taking care of your keyboard. support.logi.com
- Corsair, How to clean your keyboard and keycaps. corsair.com
- Lenovo IdeaPad Slim 5 User Guide, What should I do if I spill liquid on the computer? download.lenovo.com
- Centers for Disease Control and Prevention, When and How to Clean and Disinfect a Facility (cdc.gov, hygiene section).
