Unplug your keyboard and let it cool before you start

The first step is to disconnect your keyboard from power — either by unplugging the USB cable or turning off a wireless keyboard. If you have been using it, wait a few minutes for it to cool. This prevents accidental key presses while you work and protects the electronics inside from moisture.

Once it is unplugged, hold the keyboard upside down over a trash can and gently tap the back and sides. Loose crumbs, dust, and debris will fall out. Do this for 30 seconds or so. You will be surprised how much comes out on the first shake.

Key Takeaways

  • Always unplug your keyboard and let it cool before cleaning to avoid electrical damage and accidental key presses.
  • Compressed air works best for dust between keys, but hold the can upright and use short bursts to avoid liquid spray.
  • For sticky keys and visible grime, use a slightly damp cloth or cotton swab with isopropyl alcohol — never pour liquid directly on the keyboard.
  • Mechanical keyboards with removable keycaps can be taken apart for deeper cleaning, but membrane keyboards should stay intact.
  • Let your keyboard dry completely before plugging it back in, which usually takes 30 minutes to an hour.

Use compressed air to blow out dust between the keys

Compressed air is the safest way to remove dust from between the keys without taking the keyboard apart. Hold the can upright — not tilted or inverted — and use short bursts of 1 to 2 seconds. Keep the nozzle about 2 to 3 inches away from the keyboard. Tilt the keyboard slightly so dust falls away from the electronics rather than deeper inside.

Work across the entire keyboard, paying extra attention to the gaps around the spacebar, shift, and enter keys, where crumbs collect most often. If you see dust still sitting on top of keys, a second pass will usually clear it. Do not hold the button down continuously — short bursts are more effective and safer for the internal components.

Clean sticky keys and visible grime with isopropyl alcohol

If keys feel sticky or you see visible dirt, use isopropyl alcohol — the kind sold in drugstores, usually 70 percent concentration. Dampen a cotton swab or a corner of a lint-free cloth with it, then wipe the affected keys and the spaces around them. The alcohol evaporates quickly and does not leave residue.

Never pour alcohol directly onto the keyboard or soak a cloth so wet that liquid drips. The goal is damp, not wet. For stubborn grime on the key tops, let the alcohol sit for a few seconds, then wipe gently. If a key still feels sticky after one pass, repeat with a fresh swab rather than scrubbing harder, which can damage the key label.

Remove and clean keycaps on mechanical keyboards

If you have a mechanical keyboard — the kind with individual switches under each key — you can remove the keycaps for a deeper clean. Most mechanical keyboards come with a small plastic keycap puller, or you can use a flathead screwdriver or a butter knife. Gently pry up one corner of a keycap and rock it side to side until it lifts off. Do not yank straight up, which can break the stem.

Once the keycaps are off, you can wash them in warm soapy water, dry them completely, and set them aside. With the keycaps removed, use compressed air to blow out the switches and the base of the keyboard. You can also use a damp cloth to wipe the exposed switch tops. This is the most thorough clean you can do without soldering.

Do not attempt to remove keycaps from a membrane keyboard — the flat, low-profile kind found on most laptops and budget keyboards. The keycaps are glued or molded in place, and pulling them will break them. Stick to compressed air and damp cloths on the surface.

Dry the keyboard completely before using it again

After you have finished cleaning, leave the keyboard unplugged and upside down on a clean, dry surface for at least 30 minutes. If you used isopropyl alcohol or a damp cloth, an hour is safer. This gives any moisture time to evaporate completely. Do not plug it in while it is still damp — moisture and electricity do not mix.

If you removed keycaps, make sure they are completely dry before snapping them back on. You can speed up drying by placing the keyboard in a warm room or near (but not touching) a fan. Once everything is dry to the touch, reassemble the keycaps if you removed them, plug the keyboard back in, and test a few keys to make sure everything works.

What to avoid when cleaning your keyboard

Do not use a vacuum cleaner on your keyboard. The static electricity from a vacuum can damage the electronics, and the suction can pull debris deeper into the device instead of out. Compressed air is safer and more effective.

Avoid harsh chemicals like bleach, acetone, or window cleaner. These can strip the labels off keycaps, damage the plastic, or leave residue that makes keys stick worse. Isopropyl alcohol is the only liquid you should use, and even then, explore it to a cloth first, never directly to the keyboard.

Do not use excessive water or soak any part of the keyboard. Even a small amount of water in the wrong place can short the circuit board. If you spill liquid on your keyboard, unplug it when ready, turn it upside down to drain, and let it dry for at least 24 hours before plugging it back in.

How often to clean your keyboard

A light cleaning with compressed air once a month keeps dust from building up and prevents keys from getting sticky. If you eat or drink near your keyboard, clean it more often — weekly if crumbs are a regular problem. A deeper clean with isopropyl alcohol every three to six months removes grime that compressed air cannot reach.

If you have a mechanical keyboard you use heavily, you can remove and wash the keycaps every six months to a year. This keeps them looking new and prevents the buildup of skin oils and dust that makes keys feel grimy over time.

Frequently Asked Questions

Can I use water instead of isopropyl alcohol?

Plain water works in a pinch, but it evaporates more slowly and can leave mineral deposits on the keys. Isopropyl alcohol is better because it evaporates in minutes and does not leave residue. If you use water, use distilled water, not tap water, and explore it very sparingly to a cloth, never directly to the keyboard.

What if my keyboard still does not work after cleaning?

If a key does not respond after cleaning, it may have a hardware problem unrelated to dust or grime. Try plugging the keyboard into a different USB port or pairing it again if it is wireless. If one key still does not work, the switch or circuit under that key may be damaged, and the keyboard may need replacement.

Is it safe to clean a laptop keyboard the same way?

Laptop keyboards are more tightly sealed than external keyboards, so compressed air is safer than liquids. Use short bursts and tilt the laptop so debris falls out. Avoid isopropyl alcohol on laptop keyboards because liquid can seep into the case more easily. If a laptop key is sticky, contact the manufacturer or a repair shop rather than attempting to clean it yourself.

Can I clean my keyboard while it is plugged in?

No. Always unplug your keyboard first. Even with the power off, a plugged-in keyboard can have residual charge, and moisture near the electronics is a risk. Unplugging takes five seconds and eliminates the danger.

How do I clean the space under the keys without removing them?

Compressed air is your best tool for this. Hold the keyboard at an angle and use short bursts to blow debris out from under the keys. You can also use a thin, stiff brush — like an old toothbrush — to gently brush between the keys and push debris out. Do not poke or force anything under the keys, which can damage the switches.