How to Clean a Mechanical Keyboard (Without Breaking It)
Learning how to clean mechanical keyboard parts properly is mostly about knowing what not to do: no liquid into the switches, no heat, no prying keycaps with a screwdriver, and no plugging in until everything is dry. With those rules the job is safe and satisfying, and it fixes more problems than people expect, because a key that chatters, sticks or needs a hard press is far more often dirty than broken. This guide covers a ten-minute quick clean, a deep clean with the keycaps off, the right response to a spill, when and how to clean the switches themselves, and the step most guides skip: testing every key afterwards, with the keyboard tester for registration and the chatter test for the double-typing that dirt and spills cause.
How to clean a mechanical keyboard in ten minutes (quick clean)
Ten minutes, no tools beyond a soft brush and a cloth, done every few weeks. Unplug the keyboard (or turn off a wireless one), turn it upside down over a bin and tap the back a few times; crumbs and hair fall out of the gaps between the keycaps. Hold it at an angle and run a soft brush (a clean paintbrush, a make-up brush or a dedicated keyboard brush) between the rows, working from the top row down so debris moves toward the edge and out; a can of compressed air used in short bursts from a hand’s width away does the same job faster, but keep it upright so it does not spray propellant, and never aim it straight down into a switch at close range, which drives dust in rather than out. Wipe the keycap tops with a microfibre cloth that is barely damp with water, or with a cloth lightly dampened with isopropyl alcohol for the shine that fingertips leave, and dry them with a second cloth; do not let liquid run between the caps. Let the board sit for a few minutes before plugging it back in. Then press every key once on the tester; a key that was intermittent before a quick clean and is fine after it was a crumb under the cap.
Deep clean (keycaps off)
An hour or so, every few months, or whenever the quick clean no longer helps. You need a wire keycap puller (the ring-and-wire kind; plastic pullers scratch caps), a bowl of warm water with a little dish soap, a brush, a small vacuum or compressed air, and somewhere to dry the caps overnight. Photograph the keyboard first, from directly above, with every key visible; it is the only reliable way to put the caps back where they came from, and the keyboard layout drawings on the tester pages help for the main block but not for a custom set. Pull the keycaps: hook the wire under opposite corners of a cap and pull straight up with a slight wiggle; never lever to one side, which bends the stem or the switch’s cross. The long keys, spacebar, Enter, both Shifts and Backspace, sit on stabilisers and come up stiffer; pull them straight and slowly, and note how the stabiliser wires sit, because they go back the same way. On low-profile and laptop-style keyboards the caps use different clips and often should not be removed at all; check the maker’s instructions before pulling. Wash the caps in the warm soapy water, swishing them, then rinse and lay them face down on a towel to dry fully, which takes hours; any water trapped inside a cap’s stem will end up in the switch. Do not use hot water, a dishwasher or any solvent on keycaps, which can warp, fade or dull them, and keep legends that are printed rather than moulded away from alcohol. Clean the plate: with the caps off, brush the plate and the switch tops, vacuum or blow the debris away, and clean around the switch housings with a dry brush; for grime, a cotton swab barely moistened with isopropyl alcohol around the switch and on the plate, never into the switch opening. Refit the caps from the photograph, pressing each straight down until it seats, stabilised keys last. Then test every key, and run the chatter test on the keys you handled most; a cap pressed on crooked shows as a key that registers only on a hard press.
Liquid spills
Speed matters more than technique. The sequence, in order and with its timings, is in the figure below, and the first step is the one that saves the keyboard: unplug it or remove the battery immediately, because corrosion and short circuits need power, and a keyboard that is unpowered while wet usually survives. Turn it upside down at once so the liquid drains out of the switches rather than down into the circuit board. Pull the keycaps over the wet area within a few minutes and blot with paper towel, pressing rather than wiping so the liquid comes up rather than spreading. Dry it upside down for one to three days at room temperature with airflow, longer for a large spill; no hair dryer, no radiator, no oven, since heat warps the plastics and drives moisture into places it would have evaporated from. Then plug in and test.
What you spilled decides the follow-up. Water evaporates clean, and a keyboard that passes the tester after drying is fine. Coffee, tea, juice, soft drinks, beer and anything sugary leave residue when they dry: sugar makes keys sticky and slow to return, and acids and sugar on the switch contacts cause chatter days or weeks later, when the board seemed to have recovered. For those, after the board is dry, clean the affected switches as described in the next section, or on a hot-swap board pull them out, rinse them separately in isopropyl, dry them for a day and refit. Switches that still stick or chatter after cleaning are replaced; a switch is cheap, a keyboard is not. The chatter test, run on the spill area a week later, is how you find the ones that are going bad before they ruin your typing.
Cleaning switches
Switches themselves rarely need cleaning unless something got in: a spill, a sticky residue, or years of dust in a smoker’s or a pet owner’s house. The symptoms are a key that sticks or returns slowly (debris or residue on the stem and housing), a key that needs a hard press or registers intermittently (dirt between the contacts, or a bent pin on a hot-swap board), and chatter, which the chatter test measures as two registrations within a few milliseconds of one press and which is the contacts’ complaint about dirt or wear. Three levels of intervention. Without opening the switch: with the cap off, a short burst of compressed air at an angle across the switch opening, then a drop (one, not a squirt) of contact cleaner or isopropyl alcohol down the side of the stem while working the key up and down a few dozen times, then a day to dry. This clears most sticky or chattering keys. Removing the switch on a hot-swap board: pull it straight up with a switch puller, rinse it in isopropyl, work it, dry it fully, check its pins are straight, and press it back in; this is the proper fix after a sugary spill. Opening the switch: the two housing halves unclip (a switch opener or a small flat tool at the clips), exposing the stem, spring and the contact leaves; clean the housing and stem, leave the contact leaves alone beyond a gentle wipe, and never lubricate the contacts, since lubricant on the leaves is itself a cause of chatter; reassemble, making sure the leaf sits in its slot. On a soldered board the first level is all that is practical without desoldering. Whatever you did, the final check is the same: press the key on the tester for registration, then run the chatter test for a minute of normal typing on that key.
Laptop and low-profile keyboards
The deep clean above assumes a full-height mechanical keyboard with removable caps on cross stems. Laptop keyboards and most low-profile boards are different: the caps sit on delicate scissor or butterfly mechanisms, or on low-profile switches with their own clips, and pulling them with a wire puller breaks the mechanism more often than not. For those, stay with the quick clean: power off, tap out, brush, short bursts of air at a shallow angle, and a barely damp cloth; if a single cap must come off, look up the maker’s instructions for that model first, lift from the specified edge with a plastic tool, and expect that some designs are not meant to be removed by the user at all. A spill on a laptop keyboard is a spill on the laptop: power off immediately, unplug, turn the whole machine upside down in a tent shape over a towel, and give it days to dry; the keyboard may need replacing, but the board underneath is what you are saving. After any of this, the keyboard tester with the laptop layout, or the Mac keyboard tester on a MacBook, confirms every key registers, which is the only check that matters once the machine is back on.
Lighting, wrist rests and the gap under the case
Three places dirt hides that the standard clean misses. Lighting: on boards with per-key LEDs, the LED sits on the plate beside or inside each switch and is the first thing a liquid reaches; after a spill, a key whose light stays off while the switch works has a damaged LED rather than a dead key, and a key that lights but does not register is the reverse. Keep swabs and liquid away from the LED lenses, which cloud with alcohol. Wrist rests: a wrist rest attached to the keyboard collects skin oil along its edge and feeds crumbs under the bottom row; detach it if it detaches, clean it separately, and clean the join. The case gap: debris that falls through the plate collects on the circuit board inside the case, where it does no harm until a spill turns it into paste; a deep clean on a board that opens easily (a few screws under the feet on many) includes a brush and a blow-out of the case interior, with the board unplugged and the battery out on wireless models, and no liquid anywhere near the circuit board.
Smoke, pets, sticky residue: the hard cases
Some keyboards need more than a clean. Tobacco smoke coats everything in a tar film that dulls caps, yellows light plastics and makes stems sticky; caps need a longer soak in warm soapy water and perhaps a second wash, and the plate and switch housings need isopropyl on swabs rather than a dry brush. The yellowing itself is permanent on most plastics. Pet hair wraps around stems and stabiliser wires and is the usual cause of a key that returns slowly on an otherwise clean board; it needs tweezers with the caps off rather than air, which just moves it. Sticky residue from an old spill, from a sugary drink that was “fine once it dried” or from fingers, shows as keys that feel slow or need a firm press and as chatter on the chatter test; the fix is the switch-cleaning levels above, up to pulling and rinsing the switch on a hot-swap board, and replacing switches that stay bad. Corrosion after a spill that was not unplugged in time looks like green or white crust on the switch pins or the board’s traces; it can sometimes be cleaned with isopropyl and a soft brush, but a board with corroded traces usually has keys that fail in groups (a whole row or column), which no cleaning fixes. In all of these, the tester tells you where you stand: a board that passes every key and the chatter test after a hard clean is fine; one that fails in a pattern is a repair or a replacement, and knowing that before you spend an evening on it is the point of testing first.
Tools, products and what to avoid
A short list of what works and what damages. Use: a wire keycap puller; a soft brush; a microfibre cloth; compressed air in short bursts, held upright; warm water with a drop of dish soap for keycaps; isopropyl alcohol (70 % or higher) on a swab for plates, housings and switch stems, in small amounts; contact cleaner for switch contacts; cotton swabs; a small vacuum with a brush attachment for the plate. Avoid: any liquid poured or sprayed into the keyboard; a dishwasher or hot water for caps; household cleaners, bleach, acetone and window cleaner, which attack plastics and legends; alcohol on printed (non-moulded) legends, which can wipe them; a hair dryer or any heat for drying; metal tools for prying caps; and lubricants anywhere near the contacts unless you are deliberately lubing stems and know where not to put it. For wireless keyboards, remove the battery before anything wet and let the battery compartment dry separately. For keyboards with lighting, keep liquid away from the LEDs on the plate as much as from the switches.
After cleaning: test every key
Cleaning moves parts and liquids around, so test the result rather than assume it. Plug in (only when fully dry), open the keyboard tester, click the drawing, and press every key once, working in rows; the counters show how many are untested, and the list of untested keys shows which cap went on crooked or which switch did not seat. Then type normally for a minute on the chatter test: it records the interval between registrations per key and flags any under the threshold, which is how a switch that took in liquid announces itself before you notice doubled letters. The spacebar test gives the longest key, the one most likely to have a stabiliser refitted wrong, a hundred presses and reports any that were missed. On a Mac, the Mac keyboard tester draws the board correctly for the same check. If a key fails registration after a deep clean, pull its cap and look: a stem not centred in the switch, a stabiliser wire out of its clip, or a switch pin bent on a hot-swap board account for nearly all of them. If a key chatters after a spill and the switch-cleaning steps do not cure it, replace the switch; that is the one outcome cleaning cannot change.
Keeping it clean
Habits that stretch the time between deep cleans: no eating over the keyboard, which is the whole of the crumb problem; a lid-equipped cup or a cup kept on the far side of the mouse, which is the whole of the spill problem; washed hands before long sessions, which keeps the caps from shining and the gaps from gumming; a cover or a drawer for a keyboard that is not used daily, since dust settles into an idle board faster than a busy one; and the quick clean every few weeks so that a deep clean is a once-a-year event rather than a quarterly rescue of a board that has started to stick. A keyboard that is cleaned and tested regularly lasts for many years, and the chatter test run every so often catches a failing switch while it is still one switch rather than a row of them, which is the difference between a five-minute swap and a new keyboard.
FAQ
How do I clean a mechanical keyboard without removing the keycaps? Unplug, turn it over and tap out debris, brush between the keys from the top row down, use short bursts of compressed air held upright, and wipe the caps with a barely damp cloth. Dry before plugging in and press every key on the tester afterwards.
Can I wash mechanical keyboard keycaps? Yes, in warm water with a little dish soap; rinse and dry them face down for hours until no water remains in the stems. Not in a dishwasher or hot water, and keep alcohol away from printed legends. Low-profile and laptop caps often should not be removed.
What do I do if I spill liquid on my mechanical keyboard? Unplug or remove the battery immediately, turn it upside down, pull the caps over the wet area and blot, then dry upside down at room temperature for one to three days. Test every key afterwards; sugary drinks need the affected switches cleaned or replaced even if the board seems fine.
Can I use alcohol to clean a keyboard? Isopropyl alcohol on a swab is fine for the plate, switch housings and stems in small amounts, and on a cloth for keycap grime with moulded legends. Do not pour it into switches, and keep it off printed legends and lubricated parts.
Why does a key still double type after cleaning? The contacts are worn or contaminated beyond what cleaning reaches. Confirm with the chatter test; try a longer debounce in the keyboard’s software, a drop of contact cleaner down the stem, or on a hot-swap board rinse the switch in isopropyl. If it persists, replace the switch.
How often should I clean a mechanical keyboard? A quick clean every few weeks and a deep clean with the caps off every few months, sooner in a dusty room or with pets, and immediately after any spill. Test every key after each clean.
Is compressed air safe for a mechanical keyboard? In short bursts, held upright, from a hand’s width away, yes. Do not aim it straight down into a switch at close range, which drives debris in, and do not tilt the can, which sprays liquid propellant.