How to Clean a Keyboard Safely: Step-by-Step Guide
In this article
To clean a keyboard safely, first shut down and unplug it (or remove its batteries), then turn it upside down and shake out loose debris. Use a soft brush or compressed air to clear the gaps, wipe the keycaps and chassis with a lightly dampened microfiber cloth, and let everything dry completely before reconnecting. Never spray liquid directly onto the keyboard, and never put a mechanical keyboard in the dishwasher. That short sequence covers 90% of everyday cleaning without risking the electronics.
Cleaning a keyboard does more than make it look better: it removes the grit and skin oils that make keys feel sticky, reduces the dust that can cause missed keystrokes over time, and cuts down on the grime that builds up between keycaps. Before you start, check your keyboard's manual for any manufacturer-specific cleaning advice, and note whether it is a standard membrane keyboard, a mechanical board with removable keycaps, or a laptop keyboard (which is the most delicate case). The steps below assume a desktop keyboard; laptop-specific cautions appear where they matter.
What You'll Need
- Microfiber cloths (at least two: one for dust, one for damp wiping)
- Isopropyl alcohol (70% or higher) — optional but effective for sticky residue
- Compressed air can or a rubber air blower
- Soft-bristled brush (a clean paintbrush or dedicated keyboard brush)
- Keycap puller (only if your keyboard has removable keycaps)
- Cotton swabs for tight spots
- Small bowl or container for screws and keycaps (if disassembling)
- Dish soap and warm water (for washing keycaps only)
Step-by-Step
- Power down and disconnect. Shut down your computer, then unplug the keyboard's USB cable or turn it off and remove batteries if it is wireless. This prevents accidental keystrokes and protects the electronics from moisture.
- Turn it upside down and shake gently. Hold the keyboard over a trash can or sink and shake it lightly to dislodge crumbs, dust, and hair. Do not bang it against a hard surface.
- Blow out the gaps with compressed air. Use short bursts at an angle, keeping the can upright to avoid propellant spray. Work along the rows and around the edges. If you don't have compressed air, a rubber air blower works and avoids moisture.
- Brush between the keys. Use a soft brush to sweep dust and debris toward the edges, then shake it out again. A dry brush is safer than a damp one at this stage.
- Remove keycaps (only if your keyboard supports it). Check your manual first. Use a keycap puller and pull straight up with even pressure. Do not remove keycaps on laptops or on keyboards where the manufacturer says they are not removable. Take a photo before removing so you can put them back correctly.
- Clean the keycaps. Place removable keycaps in a bowl of warm water with a drop of dish soap. Let them soak for 10–15 minutes, agitate gently, rinse, and dry completely on a towel. Do not use hot water or harsh cleaners, which can warp plastic or remove legends.
- Wipe the chassis and key surfaces. Dampen a microfiber cloth with water or isopropyl alcohol — wring it out so it is barely damp, never dripping. Wipe the top of the keys and the frame. For sticky spots, use a cotton swab lightly moistened with isopropyl alcohol. Never spray liquid directly onto the keyboard.
- Clean the underside and cable. Wipe the bottom and the cable with a dry or barely damp cloth. Check that no liquid seeps into seams or ports.
- Let everything dry fully. Wait at least 30 minutes after any damp wiping, and longer if you washed keycaps. Moisture trapped under keys is the main cause of post-cleaning failures.
- Reassemble and test. Replace keycaps once dry, reconnect the keyboard, and test every key in a text editor or a keyboard tester website. If a key does not register, see Troubleshooting below.
Common Mistakes
- Spraying cleaner directly on the keyboard. Liquid runs into the switches and circuit board. Always apply cleaner to a cloth first.
- Using a soaking wet cloth. Even a damp cloth should be wrung out until it barely feels moist.
- Putting a keyboard in the dishwasher or sink. This destroys membrane and mechanical keyboards alike. Only detached keycaps should be washed.
- Using harsh chemicals. Bleach, ammonia-based glass cleaners, and abrasive pads can damage plastic and printed legends. Isopropyl alcohol is the strongest cleaner you should use, and only sparingly.
- Pulling keycaps on a laptop or non-removable board. Laptop scissor switches break easily and are hard to reattach. Clean laptop keyboards with air, a brush, and a barely damp cloth only.
- Reconnecting before everything is dry. Residual moisture can cause shorts or sticky keys.
- Shaking too hard or upside down over the sink without care. Keycaps can pop off, and small parts can go down the drain.
Tips
- Clean your keyboard every 1–3 months, more often if you eat at your desk or have pets.
- Keep the compressed air can upright and use short bursts; long bursts can spray cold propellant and leave residue.
- Use a keycap map or take a photo before removing keycaps, especially on non-standard layouts.
- For sticky residue, isopropyl alcohol on a cotton swab is more effective and safer than water alone.
- Store the keyboard under a cover or dust cloth when not in use if dust is a recurring problem.
- If your keyboard has a wrist rest, clean it separately according to its material (leather, foam, or plastic).
Troubleshooting
- A key doesn't work after cleaning. Let the keyboard dry for several more hours, especially if you used any liquid. If it still fails, the switch may be damaged; on a mechanical keyboard with hot-swappable switches, you may be able to replace the switch, but check your manual first.
- Keys feel sticky. Residue from sugary drinks or cleaner is the usual cause. Wipe the affected keys with a barely damp isopropyl alcohol cloth and let dry. Do not flood the area.
- Keycaps won't go back on. Check orientation and alignment; most keycaps are shaped to fit one way. Do not force them. If a stabilizer bar popped out on a long key (spacebar, Shift), you may need to reseat it carefully or consult a repair guide for your model.
- Liquid spilled inside. Unplug immediately, turn the keyboard upside down, and let it drain and dry for at least 48–72 hours before trying it. Do not power it on while wet. If it was a sugary or sticky liquid, professional cleaning may be needed.
- Keys are louder or wobblier after cleaning. A keycap may not be fully seated. Press it down firmly and evenly until it clicks into place.
Frequently Asked Questions
Can I use a vacuum cleaner on my keyboard?
A vacuum with a brush attachment can remove loose debris, but avoid strong suction near keycaps and never use a wet/dry vacuum. Static from some vacuums can be a concern, so keep the nozzle a few inches away and use low suction.
Is it safe to put keycaps in the dishwasher?
No. Dishwasher heat can warp plastic and remove printed legends. Hand-wash keycaps in warm water with a drop of dish soap and air-dry them completely.
How often should I clean my keyboard?
Every one to three months for most people. Clean more often if you eat at your desk, have pets, or notice keys feeling sticky.
Can I use alcohol wipes on my keyboard?
Yes, but wring them out so they are not dripping, and avoid letting liquid pool around the keys. Isopropyl alcohol (70% or higher) is generally safe on plastic keycaps and frames, but check your manufacturer's guidance for special coatings.
What should I do if my laptop keyboard gets dirty?
Use compressed air, a soft brush, and a barely damp microfiber cloth. Do not remove keycaps on a laptop unless the manufacturer explicitly says they are removable, and never spray liquid directly on it.
Can I clean a mechanical keyboard without removing keycaps?
Yes. Air, a brush, and a damp cloth will handle most dust and surface grime. Removing keycaps gives a deeper clean but is optional and should only be done if your keyboard supports it.