Practical UK cleaning guides, researched, checked and written for British homes
Tech Products

How to Clean a Keyboard: Mechanical, Membrane & Laptop

Clean a keyboard by tilting, brushing and blowing out debris before any damp wipe. Keycaps can be washed, but never soak the board itself.

MB
Marcus Bell
Researched for UK homes
21 min read
Clean mechanical keyboard with cleaning supplies including compressed air and microfiber cloth for keyboard maintenance guide

Some keyboard problems announce themselves. A key that stays down, a letter that types twice, a space bar that clicks like a stapler, a wet patch where the coffee went. Others you only notice when you tip it over the desk and a small drift of crumbs, hair and skin flakes falls out. Both are usually fixable at home, and the order you try things in decides whether you rescue the keyboard or wreck it.

This guide starts with symptoms and likely causes, then works through the fixes from the easiest and safest to the most involved, and finishes with the situations where you should stop and ask someone else. It is a companion to our guides on cleaning a laptop screen safely and cleaning a laptop fan, and the wider cleaning products section lists what is worth keeping in the cupboard. For more everyday care guides, see the Cleaners Guide homepage.

Disclosure: Cleaners Guide is a participant in the Amazon Associates programme, so if you buy through links on this page we may earn a small commission at no extra cost to you. It never changes our recommendations, we suggest products because they work and we point out cheaper options where they do the same job. Prices and availability change, so always check the current price before buying.

Cleaning a keyboard
Air, a brush and a little gel lift crumbs and grime from between the keys.

What the symptom usually means

What you noticeLikely causeTry first
Keys feel gritty or scrape when pressedCrumbs, dust or hair under the keycapTilt, shake, then short bursts of compressed air
One key sticks or returns slowlyDried sugary drink, grease, or something wedged beside the keyWipe around it, then lift the keycap if it is a type that comes off
A key types twice, or not at allDirt on the contacts, or a failing switch or membraneClean around it carefully, test on another computer, check the settings
Whole rows are unresponsive after a spillLiquid has reached the circuitUnplug, drain, dry, and stop pressing keys
Shiny, greasy, grey-looking keysSkin oils polishing the keycap textureWipe with an alcohol-dampened cloth, wash keycaps if removable
A stale smell from the boardFood, damp or a spill that never fully driedDeep clean, and dry it completely before use
Space bar rattles or sounds unevenDebris around the stabiliser, or a dislodged stabiliser wireClean carefully, then check it is seated correctly
A key that still misbehaves after a proper clean is often a hardware fault, not dirt.

Most of these are surface problems. The ones that are not, a spill that has soaked through or a key that fails on a second computer too, are covered in the later sections on spills and on knowing when to stop.

Know your keyboard before you start

The right method depends more on how the keyboard is built than on how dirty it is.

Mechanical keyboards

Each key sits on its own switch, and most keycaps pull straight off. That makes them the easiest to deep clean, and a keycap puller is the safe tool for the job. Some mechanical boards are hot-swappable, meaning the switches also lift out, but you should only pull switches if the manual says so. Keycaps are normally ABS or PBT plastic. Both cope with mild soapy water and alcohol wipes, though solvents such as acetone and nail polish remover can cloud or soften plastic and are best kept well away. Printed or painted legends can wear with hard scrubbing, and decorative resin or wooden caps need gentler treatment than ordinary plastic.

Membrane and rubber-dome keyboards

Most budget desktop keyboards sit on a printed plastic membrane and a sheet of rubber domes. The keys are often held on by small clips, and the layers underneath are the part you cannot see or wash. Removing keys can break the clips, and liquid that gets into the membrane layers is hard to remove. Treat these as surface-clean-only unless the maker gives instructions.

Laptop keyboards

A laptop keyboard is attached to the machine, with a ribbon cable and electronics close below. Keys use delicate scissor or butterfly-style clips that snap easily, and the layout of clips differs between models, so do not pull keys off unless the manufacturer’s service guidance shows how. Apple’s own support advice for notebook keyboards, for example, is to tilt the machine and use short bursts of compressed air rather than anything wet. Apply the same principle to any laptop: shut it down, unplug the charger, and use minimal moisture.

Laptops: the trackpad, the palm rest and the gaps

The area around a laptop keyboard collects as much skin oil as the keys do. Wipe the palm rest and the trackpad with a microfibre cloth that is lightly dampened with plain water or the maker’s recommended cleaner, using light pressure, and dry it straight away. Skip rough kitchen paper and abrasive pastes, which scuff the finish. Where the keys meet the case, use a cotton bud that is barely damp, then a quick pass with compressed air held at an angle. If a keyboard backlight or key behaves oddly afterwards, power down and let it dry before trying again.

Keycaps, stabilisers and switches in brief

Three details change how careful you need to be. First, keycap plastic. ABS caps tend to go shiny with use, PBT caps tend to hold their texture longer, and both can be washed gently, but caps with printed or pad-printed legends lose their lettering to hard scrubbing, while double-shot caps have legends moulded through the plastic. Second, stabilisers. Long keys such as the space bar, enter, shift and backspace sit on small wire-and-clip assemblies that balance the key. If a long key feels loose, rattles or sticks on one side, the wire has often popped out of its seat, and the fix is refitting it, not more cleaning. Third, switches. Linear, tactile and clicky switches are all sealed to different degrees, and some boards have switch housings that are open to dust from above. Optical switches rely on a light path that dust can block. If the switch is soldered in, you clean around it, and if it is hot-swappable, the maker’s guide will tell you how to remove it safely.

Keyboard typeAir and brushDamp wipe on keytopsRemove keycapsWash the keycaps
Mechanical, standardYesYesYes, with a pullerYes, by hand
Membrane or rubber domeYes, gentlyYes, barely dampOnly if the maker says it is designed for itOnly if removable
LaptopYes, short bursts at an angleYes, barely dampNo, unless the service guide shows howNo
Low-profile or wireless slim boardYes, gentlyYes, barely dampCheck the maker’s guide firstCheck the maker’s guide first
If the manual contradicts this table, follow the manual.

Before any cleaning, set up properly

  • Shut the computer down, unplug a wired keyboard, and switch off or remove the batteries from a wireless one. Unplug a laptop’s charger too.
  • Take a clear photo of the layout, particularly if the keyboard has non-standard keys or a custom layout, so you can refit every key correctly.
  • Work on a light-coloured towel in good light so dropped keycaps and springs are easy to see.
  • Have a shallow dish ready for keycaps, with space to keep sections together.
  • Ventilate the room if you are using alcohol, and keep it away from open flames and heaters.

Fixes, from the easiest to the hardest

Step one: tilt, shake and tap

Hold the keyboard upside down over a bin or a sheet of paper and shake it gently from side to side, tapping the back. This clears loose crumbs and grit with no risk. For a laptop, turn it onto its side or tilt it, rather than turning it fully upside down with the lid open, and keep any shaking light.

Step two: compressed air

Compressed air reaches under the keycaps without adding any moisture. Keep the can upright, because tipping it can release cold liquid propellant, which can leave residue and chill plastic. Use short bursts rather than a long blast, and aim at the gaps along the rows from a few centimetres away. Sweep in one direction with the keyboard tilted, so the debris is blown out, not further in. A can with a thin extension tube gives better control. Do not use it on a keyboard that is switched on, and be gentle with laptops and tiny low-profile keys. Electric dusters that blow air from a nozzle are an alternative if you do this often and dislike the cans. See air dusters on Amazon

Step three: brush and gel

Run a soft, clean brush between the rows to loosen what air cannot, such as hair and fluff. A soft paintbrush or a clean, soft toothbrush will do. Some people also press a squishy cleaning gel or putty into the gaps to lift grime, which can work well on a keyboard that is gunked up but intact. Keep gel for sealed, undamaged boards and never press it into broken or missing-key gaps, where it can stick to internal parts. See keyboard cleaning gels on Amazon

Step four: a damp wipe on the keytops

For greasy keys and fingerprints, use a lint-free microfibre cloth that is damp, not wet, with isopropyl alcohol or a mild soapy solution wrung out thoroughly. Apply the liquid to the cloth, never straight onto the keyboard, and never let a drop run into the gaps. Use a cotton bud for the edges of keys. Isopropyl alcohol evaporates quickly, which is why it is a favourite for electronics, and the percentage you buy is partly down to the manufacturer’s advice. Many device makers recommend isopropyl wipes at around 70 per cent for hard surfaces, and higher strengths are also sold for electronics, so check the guidance that came with your equipment and leave the keyboard to dry before use. Do not use bleach or abrasive powders. See isopropyl alcohol on Amazon Our article on whether disinfectant wipes actually work is worth a look if you plan to wipe a shared keyboard regularly.

Step five: remove the keycaps and wash them

Only do this on keyboards that are designed for it, normally mechanical ones. Slide a keycap puller under opposite edges and pull straight up with even pressure, so the cap releases cleanly. A flat plastic tool also works, but a puller is much less likely to crack the cap. Take a photo first, and keep the larger keys such as space bar, shift and enter in a safe place, because those may use stabilisers that need care.

  1. Put the keycaps in a bowl of warm, not hot, water with a little mild washing-up liquid. Let them soak for a while to loosen the film of oil and grime.
  2. Scrub the textured tops and sides gently with a soft brush. Rinse in clean water until no soap is left.
  3. Dry them with a lint-free cloth, then lay them on a towel to air dry fully. Do not use heat, and make sure the inside of each cap is dry before it goes back.
  4. For legends that look stained, a cotton bud with a little isopropyl alcohol may help, but rub gently on printed legends, which can wear off.
  5. Clean the exposed plate and switch tops with compressed air, a brush and a barely damp cotton bud, and let everything dry before you refit the caps.

A keycap puller is cheap, and a set that includes a brush covers both jobs. See keycap pullers on Amazon or look at puller and brush sets.

Step six: reassemble and test

Refit each cap over its switch, line it up and press down until it seats. Using your photo, work along the rows. Then test every key in a text editor, or an online key tester if you like, before you call it done. If a key is stiff or feels different, remove it and check the stem is clear and the cap is properly aligned. Put the larger stabilised keys back last, and press each one gently from both ends to make sure the stabiliser wire has clipped in.

What each step costs you in time

StepRough hands-on timeMoisture riskSuits
Tilt, shake and tapA minute or twoNoneEvery keyboard
Compressed airFive minutesNone if the can stays uprightEvery keyboard, gently on laptops
Brush and gelTen minutesNoneIntact, undamaged boards
Alcohol wipe on keytopsTen minutesLow if the cloth is only dampEvery keyboard
Keycap removal and washAn hour or two, plus drying overnightControlled, caps onlyMechanical keyboards
These are planning figures that depend on the board. A first deep clean takes longer than later ones, because you are also learning where the clips and stabilisers are.

A word on lubricating switches

Enthusiasts sometimes lubricate mechanical switches after a deep clean. It is an optional upgrade and not part of normal cleaning, and it needs the switch to be opened. Most people should skip it. Too much lubricant can attract dust or creep onto contacts, and some keyboard makers advise against it, so only attempt it if the maker or a trusted build guide for your exact switches explains how.

Spills and stubbornly sticky keys

Time matters more than technique. The quicker the power is cut and the liquid is out, the better the outcome.

In the first minute

  1. Disconnect the power. Unplug a wired keyboard, switch off a wireless one, and for a laptop shut down, unplug the charger and hold the power button as the manufacturer advises.
  2. Turn the keyboard upside down, or the laptop onto its side or open like a tent, so liquid drains away from the electronics.
  3. Blot, do not wipe. Use paper towel or a cloth to soak up what you can reach.
  4. Do not press keys, and do not run a hairdryer on it. Heat can warp plastic and drive moisture deeper.

Plain water, sugary drinks and coffee

Plain water spills are the most forgiving, and a thorough dry may be enough. Sweet drinks, milky coffee and fizzy drinks are far worse, because the sugar dries into a sticky film that holds keys down and can leave residue between contacts. Once the first liquid is out and the board has drained, a mechanical keyboard can usually be stripped of keycaps and cleaned as in step five, using a cotton bud lightly dampened with isopropyl alcohol around the switches. Dry it for a long time, a day or two in a warm, airy room, before you reconnect it. A membrane board that has been soaked often does not recover, because the layers are difficult to separate and rinse.

Dried-on stickiness

A key that is sticky from an old spill can often be freed by lifting the keycap and cleaning the stem and the area around it with a cotton bud and a few drops of isopropyl alcohol on the bud, working it in gently and letting it evaporate. Warm, mildly soapy water dissolves sugar, but only use it on parts you can fully dry, such as removable keycaps. Avoid soaking anything electrical. If the keyboard is a laptop, stop at what you can reach from the top and book a repair if keys remain stuck.

Greasy snack crumbs

Grease holds crumbs in place, so air alone will not shift them. Loosen with a soft brush, wipe the keytops with an alcohol-dampened cloth, and for mechanical boards wash the keycaps. A little mild washing-up liquid on a cloth works for greasy fingerprints on the keytops, provided you wring it out well and finish with a cloth dampened with plain water.

Keeping a keyboard clean for good

A short routine saves the big clean. A quick tilt and wipe each week takes a minute or two, a fuller clean every month or two suits most desks, and a deep clean with keycap removal is for when something has actually gone wrong, not a fixed date. How often you need to depends on where you type. A keyboard in a dusty room, near a window or beside pets needs more air and brush time, and one used with lunch at the desk collects more crumbs and grease.

  • Wash your hands before long typing sessions, since skin oils are what dull and grease the keys.
  • Eat and drink away from the keyboard, or at least keep drinks on the side you do not type on.
  • Use a cover or a lid when it is not in use, especially in a dusty room or one where a pet sleeps.
  • Wipe shared keyboards between users. How long germs actually last is covered in our piece on how long germs live on surfaces, and if you wonder how a keyboard compares with other everyday objects, see whether your phone is dirtier than a toilet seat.
  • Fix problems early. A key that begins to stick is easier to free before a spill has dried hard.

Where the keyboard lives matters too. A board beside an open window, a radiator or a pet bed picks up dust, hair and fluff faster than one in a closed, tidy room, so expect to use air and a brush more often there. A keyboard in a shared workspace, school or office needs wiping more often than a private one, and the surface wipe matters most on keys that many hands touch.

Products and habits that do harm

Some cleaners do more harm than good on electronics. Bleach and ammonia can attack plastics and printed legends, and acetone and nail varnish remover can cloud or soften the plastic. Abrasive powders scratch. Furniture polish, such as the sprays covered in our furniture section, leaves a slippery film and is not made for keyboard plastics. Vinegar is acidic and has no place near exposed contacts. Spraying anything directly onto a keyboard sends liquid under the keys, so use a damp cloth instead. Never submerge a complete keyboard, whatever you may have heard about dishwashers, as the electronics and the glue holding it together are not designed for it.

The case, cable and wrist rest

People clean the keys and forget the rest. Wipe the case and the underside with the same damp cloth, and wipe the cable, since hands touch it as much as the keys. A foam or gel wrist rest can be wiped with a mild soapy cloth. Fabric-covered rests may be washable, so check the label. Let everything dry before you put the keyboard back in use.

If a key still misbehaves after a clean

  • Test it somewhere else. Plug the keyboard into a different computer, or pair it with a different device, and try the same key in a plain text editor. If it works there, the fault is in the original computer’s settings or software, not in the keyboard.
  • Check the settings. A wrong keyboard language or layout can make keys type the wrong symbol. On some systems, accessibility options such as sticky keys or filter keys can make keys seem to repeat or to be ignored, so check they have not been switched on by accident.
  • Check the connection and power. A loose cable, a worn USB port or weak batteries in a wireless keyboard can all cause missing or lagging keys. Try another port and fresh batteries.
  • Look closely at the switch. With the keycap off, press the switch stem with a clean fingertip. If it feels gritty, clean around it again. If it clicks but registers nothing, the contact or the membrane under it may have failed.
  • Decide whether it is worth repairing. On an inexpensive membrane keyboard, a replacement often costs less than the time, while a good mechanical board can have a single switch replaced.

When to stop and ask someone else

  • A laptop that has taken a real spill. Shut it down, unplug it and take it to a repairer, because corrosion can appear later. Leave the lid open, and do not try to turn it on to check.
  • Keys that stay dead after cleaning and drying. Test the keyboard on another computer. If the problem follows it, the membrane or switch has probably failed.
  • A complex or expensive custom mechanical board. Soldered switches, hot-swap sockets and boards with lighting and wireless modules reward care. Check the maker’s or community build guide first.
  • A burning smell, heat, swelling or a damaged battery. Stop using it and contact the maker. A swollen laptop battery is a safety matter, not a cleaning matter.
  • Anything under warranty. Read the terms before you open the keyboard, because opening it or liquid damage may affect cover, and a manufacturer or repairer may be the better route.

For a sugary or heavy spill on a good keyboard, a repair shop with ultrasonic cleaning equipment can sometimes rescue it, though the cost has to be weighed against replacing it. Ask for a quote first, and ask whether the repairer cleans keyboards specifically or only replaces them, since that changes both the price and the chance of getting your own keyboard back working. If the keyboard belongs to an employer or school, report a significant spill to whoever manages the equipment instead of fixing it yourself.

A compact keyboard-cleaning kit

Five items cover almost every job above. None are essential on day one, and a damp cloth and a tilt cost nothing. The links go to Amazon UK searches, so check sizes and current prices yourself. As an Amazon Associate we earn from qualifying purchases.

What goes in the kit
Compressed air duster
Short bursts through the key gaps. Choose one with an extension tube if you can.
Keep it upright, and do not shake it or use it near heat or flames.
Search dusters →
Isopropyl alcohol
A strength your device maker recommends, used on a cloth or a cotton bud, never poured.
Flammable, so keep it away from heat and ventilate.
Search alcohol →
Keycap puller
A wire-style puller that grips opposite edges evenly.
For mechanical keyboards only, not most laptops.
Search pullers →
Cleaning gel or putty
A soft gel that lifts grime from the gaps on an undamaged board.
Do not press it into open gaps or broken keys.
Search gels →
Puller and brush set
A soft brush for hair and fluff, often bundled with a puller.
Keep the brush for electronics, clean and dry.
Search sets →

Short answers to eight more questions

  • Can I use baby wipes or disinfectant wipes on a keyboard? Wring-out-damp wipes are fine for the keytops if the label allows use on electronics, and many device makers permit alcohol-based wipes on hard surfaces. Avoid anything dripping wet, bleach-based or scented with oils, and never let liquid run between the keys. Dry the board well afterwards.
  • Is it safe to vacuum a keyboard? A small, low-powered handheld vacuum with a brush attachment is fine on a desktop keyboard for crumbs, but it can pull off small keys or rattle loose parts and it can build static. Compressed air and a soft brush are safer, and a full-size household vacuum is too strong.
  • Why do some keys misbehave even after cleaning? Dirt is the commonest cause, but failing switches, damaged membranes, wrong language settings and software or driver faults can all produce doubled, missing or wrong characters. Test on another computer and in a plain text editor to see whether it is the hardware.
  • Can I put a keyboard or its keycaps in the dishwasher? Do not put a whole keyboard in the dishwasher, because the electronics will not survive it. Loose keycaps are best washed by hand in warm soapy water, since heat, strong detergent and a drying cycle can warp them or strip printed legends.
  • How long do keycaps need to dry? Leave washed keycaps to air-dry completely on a towel, typically overnight, before refitting them. Shake out trapped water first and stand them stem-side down. Do not use a hairdryer or radiator, because heat can warp the plastic. If any cap still feels damp inside, give it longer.
  • Is it safe to take the keys off my keyboard? On most desktop mechanical and membrane keyboards it is safe if you lift gently with a keycap puller or a flat tool, working evenly. Laptop keys use fragile clips that snap easily, so do not remove them unless the maker’s guidance shows how. Photograph the layout first so you can refit them correctly.
  • How do I remove keys from my keyboard? Photograph the layout, then slide a wire keycap puller around the key and lift straight up with even pressure. Without a puller, use a flat plastic tool at one edge, never a metal blade. Large keys such as the spacebar have stabiliser bars, so lift slowly and note how they sit.
  • How do I clean a MacBook keyboard? Apple’s support guidance for MacBook keyboards is to shut the machine down, then use a soft, slightly damp, lint-free cloth on the surface, avoiding moisture in openings. For stuck keys, Apple has advised holding the laptop at an angle and using short bursts of compressed air, moving side to side. Check Apple’s page for your model.
MB

Marcus Bell

UK cleaning guides · researched & checked

Metals, Jewellery and Personal Items Writer. Marcus writes about the smaller things people want to look after: silver, gold and brass, jewellery, glasses, trainers and leather, plus phones, headphones and other gadgets. His guides explain how tarnish, corrosion and wear actually happen, which cleaners are safe for which finishes, and when an item is better taken to a specialist. He prefers gentle methods and always notes what could damage a finish.

Leave a comment

Your email address will not be published. Required fields are marked *

Related guides