Start by shutting down and unplugging your keyboard

Before you touch any cleaning supplies, power down your computer completely and unplug your keyboard from the USB port or wireless receiver. This step prevents accidental key presses from typing random characters into open documents and protects the keyboard's electronics from moisture damage if liquid accidentally gets inside.

If your keyboard is wireless, remove the batteries as well. Wait a few minutes after unplugging to let any residual charge drain from the device. This is especially important if you plan to use any liquid cleaner, since even a small amount of moisture can short-circuit the electronics if power is still flowing through the board.

Key Takeaways

  • Always unplug your keyboard and power down your computer before cleaning to prevent electrical damage and accidental typing.
  • Use compressed air first to blow out loose debris from between the keys, holding the can upright and using short bursts.
  • For sticky keys and visible grime, dampen a cloth with isopropyl alcohol (70 percent concentration) and wipe the key caps and surfaces, never pouring liquid directly onto the keyboard.
  • Remove individual key caps only if your keyboard has a standard mechanical design; modern laptop and low-profile keyboards often cannot be safely disassembled.
  • Let the keyboard dry completely for at least 30 minutes before plugging it back in and powering on your computer.

Use compressed air to remove loose debris

Compressed air is your first tool for cleaning between the keys where dust, crumbs, and pet hair collect. Hold the can upright (never shake it or tilt it sideways) and use short bursts of air, holding the nozzle about 2 to 3 inches away from the keyboard. Work from left to right across each row of keys, then flip the keyboard on its side and repeat to dislodge particles that fall into the gaps.

Do this step over a trash can or outside if possible, since the air will blow debris out onto your desk or floor. If you see stubborn lint or hair still caught between keys after the first pass, use a wooden toothpick or a plastic cleaning pick to gently lift it out, then blow air again to clear it away. Never use a metal tool, which can scratch the plastic or damage the switch mechanism underneath.

Wipe down the key caps and surfaces with isopropyl alcohol

For visible grime, fingerprints, and sticky residue on the keys themselves, dampen a soft cloth with isopropyl alcohol at 70 percent concentration (the kind sold in drugstores for wound cleaning). Wring out the cloth so it is barely damp—not dripping—and wipe each key cap, the space bar, and the top surface of the keyboard. The alcohol evaporates quickly and kills bacteria without leaving streaks.

Never pour liquid directly onto the keyboard or spray cleaner onto it. Liquid that seeps under the key caps can damage the switches or circuit board. If a key feels sticky after wiping, dampen the cloth again and wipe that key several times, allowing the alcohol to dissolve the sticky substance. For stubborn gunk on the edges of keys, use a soft toothbrush dampened with alcohol and scrub gently in a circular motion.

Remove and clean individual key caps on mechanical keyboards

If your keyboard has removable key caps (common on mechanical gaming keyboards and some office keyboards), you can take them off for a deeper clean. Press down on one corner of a key cap and gently rock it side to side while pulling upward. It should pop off without much force. If it does not budge after a gentle pull, do not force it—your keyboard may not have removable caps.

Once removed, soak the key caps in warm water with a drop of dish soap for 5 to 10 minutes, then scrub them with a soft toothbrush and rinse under running water. Lay them on a clean towel to dry completely (at least 30 minutes) before snapping them back onto the stems. Reinstall them in the same order and position—take a photo before removing them if you are unsure. Press each cap down firmly until you hear or feel a click.

Do not attempt to remove key caps from laptop keyboards, low-profile mechanical keyboards, or any keyboard where the caps appear glued or fused to the base. Forcing them off will break the switches underneath.

Clean the keyboard base and cable

While the key caps are drying, wipe down the plastic base of the keyboard with the same alcohol-dampened cloth. Pay attention to the edges, corners, and any textured areas where dust settles. If your keyboard has a cable, wipe that down too, especially the connector end where dust can accumulate.

For the underside of the keyboard, flip it over and use compressed air again to blow out dust from the vents and rubber feet. If the feet are sticky or discolored, dampen a cloth with alcohol and wipe them clean. This step is often overlooked but makes a noticeable difference in how the keyboard looks and feels when you set it back on your desk.

Let the keyboard dry completely before reconnecting

After cleaning, place the keyboard upside down on a clean, dry towel in a well-ventilated area. Wait at least 30 minutes—longer if you used any liquid cleaner—before plugging it back in. This drying time is critical: if moisture is still trapped inside and you power on the keyboard, it can cause a short circuit and permanently damage the electronics.

You can speed up drying by placing the keyboard in front of a fan (not a heat source like a hair dryer, which can warp the plastic). Once the 30 minutes have passed and the keyboard feels completely dry to the touch, plug it back into your computer, power on, and test a few keys to make sure everything is working normally.

How often to clean your keyboard

A light cleaning with compressed air once a month keeps dust from building up and makes deeper cleaning less necessary. If you eat at your desk, drink near your keyboard, or have pets, aim for a full cleaning with alcohol every two to three months. Heavy users in dusty environments may need monthly deep cleaning.

The sooner you clean a sticky key or spill, the easier the cleanup. If you spill liquid on your keyboard, unplug it when ready, flip it upside down to drain, and let it dry for 24 to 48 hours before powering it back on. Do not try to use it while wet, even if it seems to still work—internal corrosion can develop over days or weeks.

Frequently Asked Questions

Can I use Clorox wipes or Lysol on my keyboard?

Avoid bleach-based wipes and strong disinfectants—they can damage the plastic, fade the lettering on keys, and leave a residue. Isopropyl alcohol at 70 percent is safer and more effective. If you want to disinfect, use alcohol wipes made for electronics, or dampen a cloth with diluted isopropyl alcohol and wipe the keys.

What should I do if I spilled coffee or soda on my keyboard?

Unplug when ready and flip the keyboard upside down over a sink or towel to drain. Do not try to use it. Let it dry completely for 24 to 48 hours in a warm, dry place before plugging it back in. If keys still stick after drying, the liquid may have dried inside the switches—in that case, the keyboard may need professional repair or replacement.

Is it safe to use a vacuum cleaner on my keyboard?

No. Vacuum cleaners can generate static electricity that damages the circuit board, and the suction can pull small components loose. Compressed air is the safer choice for removing loose debris.

Can I clean a wireless keyboard the same way as a wired one?

Yes, the cleaning process is identical. Just remove the batteries before you start and make sure they are completely dry before reinserting them. If the battery contacts look corroded, wipe them gently with a dry cloth or a cloth barely dampened with isopropyl alcohol.

Why does my keyboard still feel sticky after cleaning?

Sticky residue trapped under the key cap or inside the switch mechanism may not come off with surface cleaning. If the key is still sticky after wiping multiple times with alcohol, try removing the key cap (if possible) and cleaning underneath it, or use a toothpick to gently work alcohol into the gap around the key stem. If it remains sticky, the switch itself may be damaged and need replacement.