Electronics and gadgets

How to clean a keyboard: laptop, desktop and mechanical

To clean a keyboard, unplug it or shut the laptop down, tip it upside down to shake out crumbs, blow between the keys with short bursts of compressed air, then wipe the keys with a lint-free cloth barely dampened with water. Use a disinfecting wipe only if your maker allows it. On a mechanical keyboard you can pull the keycaps and soak them.

Written by BroombookPublished · Updated 7 steps Easy

As an Amazon Associate, Broombook earns from qualifying purchases.

At a glance

Time
10 minutes for a routine clean, about 1 hour of work plus 6 hours of drying for a deep clean
Difficulty
Easy
How often
A quick wipe weekly, a full clean every 1 to 3 months

What you need

  • Can of compressed air with its straw
  • Lint-free microfiber cloths (2)
  • Water
  • Cotton swabs
  • Disinfecting wipes your keyboard maker allows
  • Keycap puller, mild dish soap and a bowl (mechanical keyboards only)
Products that help
On this page

Step by step: how to clean a keyboard

Safety first. Unplug the keyboard, take out replaceable batteries, or shut down and unplug the laptop before you start. Never spray liquid onto the keys, and keep the compressed air can upright so it does not spit cold propellant.

  1. 1

    Power it off and unplug it

    Unplug a wired keyboard, switch off a wireless one and pull its batteries if they are replaceable. Shut a laptop down fully and unplug the charger. Logitech says to wait 5 to 10 seconds after switching off before you clean.

  2. 2

    Shake out the loose crumbs

    Turn the keyboard upside down over a trash can or a sheet of paper and tap the back gently. Tilt it in a few directions. You should see crumbs, hair and grit fall out; do this outside if there is a lot.

  3. 3

    Blow out the gaps with compressed air

    Fit the straw, hold the can upright and spray short bursts between the rows of keys from about half an inch away, working left to right. Turn the keyboard on its side and repeat from the other direction. Dust that the shake missed will lift out of the gaps.

  4. 4

    Wipe the keys with a barely damp cloth

    Dampen a lint-free cloth with plain water, wring it until it is almost dry, and wipe each row of keys and the frame. Wrap the cloth over a fingertip for the sides of the keys. Never pour or spray liquid onto the keyboard itself.

  5. 5

    Clean around the keys with a swab

    Run a cotton swab, barely dampened with water, around the edges of each key where grime builds into a dark ring. Squeeze excess water out of the swab first. Swap to a fresh swab as soon as one turns gray.

  6. 6

    Disinfect only with an approved wipe

    If you want to kill germs, use what your maker allows. Apple allows a 70 percent isopropyl alcohol wipe or Clorox Disinfecting Wipes on its keyboards, while Logitech says to use alcohol swabs under 25 percent alcohol or fragrance-free disinfecting wipes. Squeeze out a dripping wipe before you use it.

  7. 7

    Let it dry before you power on

    Leave the keyboard for a few minutes until every surface looks and feels dry, then plug it back in or put the batteries back. Type a line of every key to check that nothing is sticking.

How to clean each type of keyboard

The routine above works for every keyboard; what changes is how far you can take it apart. Laptop and slim keyboards stay assembled, while most mechanical keyboards let you pull the keycaps for a proper wash.

KeyboardWhat you can doWhat to avoid
Laptop (MacBook, Windows laptops)Compressed air, damp cloth, approved wipePrying off keys; the tiny clips underneath break easily
Slim desktop (Apple Magic Keyboard, Logitech MX Keys)Shake, compressed air, damp clothRemoving keycaps, aerosol cleaners
Mechanical (removable keycaps)Pull keycaps, soak them, wipe the plateWetting the switches, reassembling before the caps are dry
Membrane gaming boardsSame as slim desktopPulling caps the maker says are fixed

To clean a Mac keyboard, a MacBook or a Magic Keyboard, use the routine above and the cleaners on Apple’s list below. For a MacBook (2015 and later) or MacBook Pro (2016 and later) with a key that sticks or feels different, Apple’s keyboard guide says to hold the laptop at a 75 degree angle, spray compressed air left to right with the straw about half an inch from the keys, then repeat with the laptop turned on its right side and then its left side. If a key still misbehaves after that, Apple sends you to a store or authorized service provider rather than telling you to remove the key.

How to clean keyboard keys on a mechanical keyboard

To clean keycaps properly, pull them, soak them in warm soapy water, clean the plate underneath and let the caps dry completely before they go back on. This is the only way to get the grime off the sides of the keys and out from under them.

  • Take a photo of the layout first so every key goes back in the right place.
  • Lift the keycaps straight up with a wire keycap puller. Rock large keys like the space bar gently, since they sit on metal stabilizers.
  • SteelSeries’ cleaning method has you swish the caps in warm water with a little mild dish soap for 5 to 10 minutes, then soak them about 45 minutes more.
  • Shake the bare board upside down, blow out the plate with compressed air, and wipe it with a well-wrung cloth and swabs. Keep moisture off the switches.
  • Dry the caps on a towel, letter side up, for at least 6 hours. Water trapped in a keycap stem can drip into a switch if you rush.

Check your manual first. SteelSeries warns that the caps on some of its membrane boards are not meant to come off at all.

Which cleaners are safe on a keyboard?

Water on a cloth is safe on every keyboard; disinfectants depend on the brand, so follow your maker’s list. The rules differ more than most people expect.

  • Apple allows 70 percent isopropyl alcohol wipes, 75 percent ethyl alcohol wipes and Clorox Disinfecting Wipes on hard, nonporous surfaces like the keyboard, and rules out bleach, hydrogen peroxide and aerosol sprays.
  • Logitech allows fragrance-free disinfecting wipes and alcohol swabs under 25 percent alcohol, and says bleach, acetone, strong solvents and abrasives void the warranty. It also suggests the cold setting of a hair dryer if you have no compressed air.
  • Every maker says the same thing about liquid: put it on the cloth, never on the keyboard, and never submerge the board.

Mistakes to avoid

  • Spraying cleaner straight onto the keys, so it runs into the switches and circuits.
  • Holding the compressed air can upside down, which sprays freezing liquid propellant.
  • Prying keys off a laptop to clean under them, which snaps the clips.
  • Using bleach, acetone or nail polish remover, which fades the letters and clouds the plastic.
  • Putting washed keycaps back while the stems are still wet.
  • Cleaning a laptop keyboard while it is asleep instead of shut down, so random keypresses open apps or delete text.

Products that make this easier

Optional. Everything above works with basic supplies; these just save time or effort.

  • For between the keys

    Falcon Dust-Off Compressed Gas Duster

    The straw lets you aim short bursts into the gaps between keys. Keep the can upright and spray in short bursts, or it gets cold and can spit liquid.

    See it on Amazon
  • Soft brush and wiper

    OXO Good Grips Electronics Cleaning Brush

    One end is a soft brush that sweeps crumbs out of key gaps, the other a microfiber pad for smudges on the keys.

    See it on Amazon
  • Mechanical keyboards

    Wire keycap puller

    Wire pullers grip each cap from two sides so it lifts straight up without scratching the edges. Not for laptop keys.

    See it on Amazon
  • Disinfecting, where allowed

    Clorox Disinfecting Wipes

    Apple lists these as safe on its keyboards. Squeeze out excess liquid first, and check your own maker’s list before using them.

    See it on Amazon
  • Lint-free cloths

    MagicFiber Microfiber Cleaning Cloths

    Fine, lint-free cloths that hold just enough water for keys and leave no fluff behind.

    See it on Amazon

As an Amazon Associate, Broombook earns from qualifying purchases. Links open the product on Amazon, where sizes, sellers and prices change.

FAQ

Frequently asked questions

Can you clean a keyboard with alcohol?

Often, but check the brand. Apple allows 70 percent isopropyl alcohol wipes, while Logitech says to stay under 25 percent alcohol. Always use a wipe or a damp cloth, never a pour or spray.

How do you clean under keyboard keys without removing them?

Tip the keyboard upside down and tap it, then blow short bursts of compressed air between the keys from several angles. A soft brush or a swab around each key edge picks up what the air loosens.

What should you do if you spill on a keyboard?

Unplug it or shut the laptop down straight away, turn it upside down to drain, and blot what you can. Leave it to dry fully before you power it on, and contact the maker or a repair shop if keys stay sticky or dead.

Can you put keycaps in the dishwasher?

Keyboard makers describe hand soaking in warm soapy water, not the dishwasher. Dishwasher heat can warp thin plastic caps, so soak them by hand and air dry them.

How often should you clean your keyboard?

Wipe it weekly if you eat at your desk or share it, and do a full clean with compressed air every one to three months.

Sources

  1. Apple: how to clean your Apple products
  2. Apple: how to clean the keyboard of your MacBook or MacBook Pro
  3. Logitech: cleaning your Logitech device
  4. SteelSeries: how to clean your keyboard

General cleaning information. Always follow the care label and your manufacturer’s instructions, and test any cleaner on a hidden spot first.