The essentials in 30 seconds
Disconnect the keyboard, or remove the batteries if it is wireless. Turn it upside down and tap it gently to shake out loose debris. Blow out what is left with compressed air, or vacuum the top with a dusting brush. Wipe the keys with a lint-free cloth lightly dampened with mild soap and water, or with isopropyl alcohol of 70 % or less on the cloth. Never pour or spray liquid straight onto the keyboard. On a MacBook, Apple's method is compressed air with the laptop held at 75 degrees, sprayed left to right, then repeated on each side. Microsoft suggests cleaning monthly or whenever needed.
- Keep the compressed air can upright while spraying.
- Put the liquid on the cloth, never on the keys.
- Keys still not working after cleaning: take it in for service.
How to clean a keyboard, step by step
-
01
Disconnect it
Unplug the cable, or remove the batteries from a wireless keyboard.
-
02
Tap out loose debris
Hold the keyboard upside down and tap it gently.
-
03
Blow out the gaps
Use a can of compressed air to blow dust and debris from the surface and from between the keys.
-
04
Or vacuum it
As an alternative, gently vacuum the top of the keyboard with a dusting brush attachment.
-
05
Wipe the keys
Lightly dampen a lint-free cloth or cotton swab with mild soap and water and wipe the keys and case.
-
06
Disinfect if you want to
Microsoft says an isopropyl alcohol solution of 70 % or less, applied to a soft, lint-free cloth, is safe on its keyboards. Check your own keyboard maker's guidance.
-
07
Let it dry
Reconnect only when everything is dry.
How to clean a MacBook or laptop keyboard
Apple gives a specific compressed air method for MacBook and MacBook Pro keyboards:
-
01
Fit the straw
Use the straw that comes with the compressed air to control the airflow, and keep its end about half an inch from the keyboard.
-
02
Keep the can upright
Do not turn the can upside down while spraying.
-
03
Tilt the laptop
Hold it at a 75-degree angle, so it is not quite vertical.
-
04
Spray left to right
Spray the whole keyboard, or just the affected keys, in a left-to-right motion.
-
05
Repeat on each side
Turn the laptop onto its right side and spray again from left to right, then do the same on its left side.
If any keys still do not respond, Apple advises taking the laptop to an Apple Store or an Apple Authorized Service Provider. For other laptops, check the maker's support pages before removing any keycaps.
Keeping a keyboard clean
- Clean it monthly or whenever it needs it, as Microsoft suggests.
- Keep drinks away from the keyboard.
- Wash your hands before long typing sessions; less grime reaches the keys.
How to clean a keyboard: frequently asked questions
What is the best way to clean a keyboard?
Disconnect it, tap it upside down, blow out the gaps with compressed air, then wipe the keys with a lint-free cloth lightly dampened with mild soap and water.
Can I use alcohol to clean my keyboard?
Microsoft says isopropyl alcohol of 70 % or less on a soft, lint-free cloth is safe for its keyboards. Never apply it directly to the keys.
How do I clean under the keys without removing them?
Use compressed air with the straw attached, or vacuum the top with a dusting brush.
How do I clean a MacBook keyboard?
Hold the MacBook at 75 degrees and spray compressed air left to right, then repeat with it turned on its right and left sides.
How often should I clean my keyboard?
Microsoft suggests monthly, or whenever it needs it.
What if keys still stick after cleaning?
On a MacBook, Apple recommends service at an Apple Store or Apple Authorized Service Provider; for other keyboards, contact the manufacturer.
Sources
Manufacturer guidance, checked on 2 November 2026 (02/11/2026).
- Microsoft Support · How do I clean my Microsoft mouse or keyboard? ↗Clean monthly or whenever needed; no liquids applied directly; disconnect or remove batteries; isopropyl alcohol of 70 % or less on a soft, lint-free cloth; tap upside down; compressed air; vacuum with a dusting brush; lint-free cloth or swab with mild soap and water.
- Apple Support · How to clean the keyboard of your MacBook or MacBook Pro ↗Straw about half an inch from the keyboard, do not invert the can, 75-degree angle, left-to-right spraying, repeated on the right and left sides, service if keys are still unresponsive.
Keys still sticking?
Note the keyboard model and which keys fail before contacting the manufacturer or a repair shop.