Skip to content
Keyboards

How to Clean a Mechanical Keyboard the Right Way

By James LucasUpdated June 27, 2026

Keyboard hygiene studies have found more bacteria on the average keyboard than on a toilet seat. That statistic lives rent-free in the head of anyone who's read it. Whether you're motivated by cleanliness or just the crumbs that make keys stick, here's how to clean a mechanical keyboard without ruining it.

Before you touch anything

Two steps before removing a single keycap: unplug your keyboard and take a photo of it.

Unplugging protects the PCB from shorts if any moisture gets near the electronics. And that photo? You'll be grateful for it when you're holding 60 identical-looking black keycaps and trying to remember whether the tilde goes above the backtick or below it on your ISO layout.

If your keyboard connects via USB-C, disconnect it. Wireless boards need Bluetooth or their RF dongle switched off. Then flip the board over and give it a firm shake over a trash can. You'll be surprised what falls out.

What you'll need

Nothing exotic here. Most of this is probably already in your home.

  • Keycap puller (wire-ring style is best — plastic ring pullers scratch legends)
  • Can of compressed air
  • 70% isopropyl alcohol
  • Microfiber cloths
  • Small bowl or container
  • Dish soap
  • Cotton swabs
  • Soft-bristle brush (an old toothbrush works perfectly)

Skip the heavy disinfectant sprays. Products like Lysol contain chemicals that can discolor keycap surfaces and damage case finishes.

Quick clean vs. deep clean

Not every cleaning session needs to be a two-hour project. Know which level your keyboard needs.

Quick clean (10–15 minutes): Compressed air blast, wipe the case exterior with an alcohol cloth, clean keycap surfaces with a barely-damp microfiber. Good for weekly maintenance.

Deep clean (1–2 hours): Full keycap removal, keycap soak, plate and case wipe-down, switch area cleaning. Do this every few months or when the board starts looking noticeably grimy.

The deep clean, step by step

Removing keycaps

A wire keycap puller is inexpensive and worth it. Hook it under two opposite corners of a keycap and pull straight up with even force. Resist the urge to wiggle side-to-side — switch stems are plastic and they will snap if you torque them wrong.

Larger keys (spacebar, shift, enter, backspace) have stabilizer wires running through them. Pull these straight up as well, but be aware they'll need slightly more force. Once a keycap is off, the stabilizer inserts are attached to the keycap itself, not the switch.

Clearing out the switch area

This is where the compressed air earns its money. Hold the can upright (inverting it can spray propellant liquid onto your PCB), tilt the keyboard at an angle, and blast between every switch in short 1–2 second bursts. The debris needs somewhere to fall, so tilt the board away from you over a table or sink.

Follow up with a dry, soft-bristle brush to dislodge anything stuck to the switch housing. Don't use wet cleaning products directly on the switch plate or PCB — liquid in a mechanical switch housing causes problems.

Cleaning between and around switches

Dampen a cotton swab with 70% isopropyl alcohol and run it between rows of switches. Cotton swabs are narrow enough to reach into tight spaces without touching the PCB components or switch contacts.

For the PCB itself, do not spray or pour anything directly onto it. If there's visible residue or spill contamination on the PCB, a cotton swab lightly dampened with 90%+ isopropyl is the safest approach. 90% evaporates quickly and leaves less residue than 70%.

Cleaning the keycaps

Fill a bowl with warm (not hot) water and add a small squirt of dish soap. Drop in your keycaps and let them soak for 30–45 minutes. The soak loosens oils, skin cells, and food residue that surface wiping never fully removes.

After soaking, rinse each keycap under running water. A soft brush helps scrub any remaining spots. Shake the excess water off and spread the keycaps on a clean towel or paper towels.

Critical: Let them dry completely. Putting keycaps back on with moisture inside traps humidity under the cap and against the switch stem. Give them at least 24 hours — longer in humid climates.

Cleaning the case

Wipe down the exterior with alcohol wipes or a microfiber cloth dampened with isopropyl. For textured plastic cases, a soft brush helps clean out the texture grooves where dust hides.

Aluminum cases often develop small smudges and fingerprints over time. A very lightly dampened cloth wipes these away without affecting the anodized finish. Avoid abrasive pads — they scratch anodized aluminum permanently.

For the underside of the case and the cable port area, a dry cotton swab clears dust without risk.

Dealing with a liquid spill

If you've already spilled something and you're reading this afterward — stop, unplug, and flip the keyboard upside down right now if you haven't.

Water spills: Drain it, let it dry for 48–72 hours in a warm location with good airflow. Many keyboards survive water spills with no lasting damage if dried properly.

Coffee, juice, soda, or anything sugary: This is more serious. Sugar residue leaves a sticky film that corrodes PCB contacts over time. After draining and drying, you'll want to remove the keycaps, pull the switches if they're hot-swap, and clean the PCB with 90%+ isopropyl and cotton swabs. If the board was soldered, this is unfortunately a much more involved process.

Reassembling cleanly

Before pressing keycaps back on, verify every switch stem is upright and undamaged. A bent stem either stops the key from fitting or causes the keycap to sit at an angle.

Press each keycap straight down until you feel it click onto the stem. Don't slam them — firm, even pressure is enough. For stabilized keys, line up the stabilizer inserts before pressing down or the keycap will seat crooked.

Keeping it clean longer

A desk mat reduces the amount of dust and debris kicked up by normal use. Washing your hands before typing makes a measurable difference in keycap build-up — oils and food residue from hands are the primary source of the grime you just spent an hour cleaning.

If you eat at your desk (no judgment), a quick compressed air blast after meals prevents crumbs from working their way into switches and building up underneath keycaps. Thirty seconds of prevention saves an hour of deep cleaning.

Frequently asked questions

Can I wash my keycaps in the dishwasher?

You can, on the top rack, in a mesh bag, using the lowest heat setting with no drying heat. Many people do this and it works fine. But high heat warps PBT keycaps and fades legends on ABS keycaps, so it's a risk. Hand-washing is safer.

Can I use alcohol directly on keycap legends?

70% isopropyl alcohol is safe for PBT keycap legends. Avoid using alcohol on ABS keycaps with double-shot legends — the legends themselves are a different plastic insert, so they're fine, but the ABS surface dulls faster with repeated alcohol exposure.

How often should I clean my keyboard?

A light surface clean (compressed air + wipe) every 2–4 weeks keeps your keyboard in good shape. A full keycap removal and deep clean every 3–6 months is plenty for most users.

I spilled liquid on my keyboard. What do I do?

Unplug immediately. Turn the keyboard upside down to drain liquid away from the PCB. Do not turn it on or plug it back in. If it was water, let it dry completely for 48–72 hours in a warm area. If it was sugary liquid, you'll need to remove keycaps and switches and rinse the PCB with 90%+ isopropyl alcohol to dissolve the sugar residue before it corrodes the contacts.

My switches feel sticky after cleaning. Why?

Liquid may have gotten into the switch housing and left residue on the stem. Let the board dry completely, or remove the affected switches and open them to clean the stems individually with a dry brush or cotton swab dipped in isopropyl alcohol.