Skip to content

What is a keylogger — and how to protect your passwords from one

A keylogger records what you type — passwords included — and sends it to someone else. How keyloggers arrive, how to check for one, and the habits that make a stolen password far less useful.

Short answer

A keylogger is software that records the keys you press — and often the websites you visit — to steal passwords and other details. It usually arrives through phishing emails, Trojans or other malware. Run a full scan, including the offline scan on Windows, then change your passwords from a clean device and turn on two-factor authentication, ideally with an authenticator app or a security key.

PrivacyTechReview Editorial Team Editor-in-Chief: Kirill Prosandeev Reviewed Oct 21, 2026 6 min read

Affiliate links: we earn a commission if you buy through links on this page, at no extra cost to you. It never changes our assessments. How this works.

Illustration: red light trails rising from laptop keys into a small glowing red orb, partly cut off by a glass shield panel
Illustration: PrivacyTechReview editorial

A keylogger is a program that records which keys are pressed on a keyboard, usually to capture passwords, in NIST's definition. Some keep what they record on the computer for the attacker to collect later; others send it out automatically. Microsoft notes that keyloggers often work alongside password-stealing malware and record the websites you visit as well — so an attacker knows not just your password, but where to use it.

How keyloggers get onto a computer

  • Phishing. Some phishing attacks install keystroke loggers along with other attacker tools, NIST notes.
  • Trojans — programs that look useful but carry hidden malware.
  • Rootkits. Microsoft describes rootkits as often part of a whole suite of malware that can record passwords and keystrokes.
  • Bundled downloads and pirated software.

Signs you might have one

Keyloggers are built to stay out of sight, so there may be nothing to notice. General malware signs can still show up: a computer that slows down or crashes, tools like Task Manager or Activity Monitor that won't open, messages sent from your accounts that you didn't write — or sign-in alerts and two-factor codes for logins you didn't make.

How to check for and remove a keylogger

  1. Stop logging in to sensitive accounts on the computer you suspect.
  2. Update your security software and run a full scan.
  3. On Windows, run the offline scan too: Windows Security > Virus & threat protection > Scan options > Microsoft Defender Antivirus (offline scan). Microsoft says it works outside of Windows, so it can catch infections that hide themselves.
  4. Uninstall programs you don't recognize (on Windows 11: Settings > Apps > Installed apps).
  5. Change your passwords from a different, clean device, starting with email and banking, and turn on two-factor authentication.
  6. If the problem keeps coming back, reinstalling the operating system and restoring your files from a clean backup is the reliable fix.

Habits that make a keylogger far less useful

  • Two-factor authentication. Even if a hacker knows your username and password, they can't log in without the second factor, the US FTC explains. Security keys are the strongest method because they don't use anything a hacker can steal; codes by text or email are the least secure kind.
  • Passkeys, where a site offers them, replace the password altogether — there's nothing to type.
  • A password manager or your browser can fill in saved passwords for you. That means less typing, but it's not a fix for a computer that's already infected.
  • Don't count on the On-Screen Keyboard. Windows offers it as an accessibility tool, and Microsoft makes no security claim for it.
  • Keep Windows or macOS and your security software updated, and download software only from official sources.

Can phones have keyloggers?

On phones the same idea usually shows up as spyware or stalkerware — apps that read your messages and record what you do. Our guide to spyware explains the signs and the safe way to remove it.

A keylogger steals what you type. Two-factor authentication makes what it steals far less useful.

Sources · checked Oct 21, 2026

Our pick for this situation

Our pick

Norton · Best all-in-one bundle

VPN and password manager in every Norton 360 plan. Covers Windows, Mac, Android and iOS.

  • VPN and password manager in every Norton 360 plan
  • Covers Windows, Mac, Android and iOS

Affiliate link

Check Norton price

Opens Norton's official site

Our pick

TotalAV · Best simple, all-in-one setup

One uncluttered app on every platform. Tune-up tools in every plan; VPN from Internet Security up.

  • One uncluttered app on every platform
  • Tune-up tools in every plan; VPN from Internet Security up

Affiliate link

Check TotalAV price

Opens TotalAV's official site

PrivacyTechReview Editorial Team

Editorial

Our editorial team researches consumer security products using public vendor documentation and independent laboratory reporting.

Related reading

Antivirus

What is a rootkit — and how do you get rid of one?

A rootkit hides itself — and other malware — deep in a computer, so the system can't be trusted to report on itself. How rootkits get in, how to scan for one from outside Windows, and when reinstalling is the only sure fix.

PrivacyTechReview Editorial Team Reviewed Oct 21, 2026 7 min read
Scams & Fraud

What is phishing — and how to spot it before you click

Phishing is the oldest trick online and still the most common way accounts get taken over. What the messages look like, the forms they take, and the calm steps if you've already clicked or typed your password.

PrivacyTechReview Editorial Team Reviewed Oct 21, 2026 8 min read