What Is a Keylogger? How It Works, Warning Signs and How to Protect Yourself

By · November 26, 2026
Close-up of a computer keyboard

A clear security guide to keyloggers: what they are, legitimate vs malicious uses, software and hardware types, how infections happen, warning signs, removal and prevention tips.

Quick answer: A keylogger (keystroke logger) is software or a hardware device that records the keys you press on a keyboard. Cybercriminals use keyloggers, often hidden inside malware, to steal passwords, banking details, messages and other sensitive information. Some keyloggers also capture screenshots, clipboard data or websites visited. You can protect yourself by keeping devices updated, using reputable security software, avoiding suspicious downloads and links, enabling multi-factor authentication and using a password manager.

Every password, message and search you type passes through your keyboard. A keylogger quietly sits between your fingers and the screen, recording those keystrokes and often sending them to someone else.

Keyloggers are one of the oldest forms of spyware, yet they remain effective because they are hard to notice. This guide explains what a keylogger is, how different types work, how they get onto devices, the warning signs, and the practical steps individuals and businesses can take to stay safe.

In this article

What is a keylogger?

A keylogger is a tool that captures and records keyboard input. It can store the data locally or send it to a remote server. While the technology itself is not always illegal, it becomes malicious when installed without the user’s knowledge or consent to steal information.

Use Legitimate or malicious? Notes
Employee monitoring on company devices Can be legitimate Must follow local laws and clear workplace policies
Parental controls Can be legitimate Should be used transparently and responsibly
Software testing and accessibility research Legitimate Used in controlled environments
Stealing passwords and bank details Malicious and illegal Common goal of cybercriminals
Spying on a partner or other person Malicious and often illegal A form of stalking and privacy abuse

What types of keyloggers exist?

1. Software keyloggers

Programs installed on a device, often bundled with malware. They may hook into the operating system, run as hidden processes or operate inside a web browser through malicious extensions or scripts.

2. Hardware keyloggers

Physical devices placed between a keyboard and computer, built into keyboards, or hidden inside USB adapters. They need physical access but are invisible to antivirus software.

3. Form-grabbing and web-based keyloggers

Malicious code on websites or in browser extensions that captures data entered into online forms before it is submitted.

4. Mobile keyloggers

Malicious apps or fake keyboard apps that record what users type on smartphones.

Example
In a shared office, a small USB device was discovered plugged between a reception computer and its keyboard. It had been recording every login for weeks. A simple physical check of cables would have caught it earlier.

How do keyloggers infect devices?

  • Phishing emails: attachments or links that install malware
  • Malicious downloads: pirated software, fake updates or cracked games
  • Infected websites: drive-by downloads or malicious scripts
  • Fake browser extensions: add-ons that read everything typed into web pages
  • Malicious apps: especially from unofficial app stores
  • Physical access: someone installs software or plugs in a hardware device
  • Bundled software: free tools packaged with hidden spyware

What information can a keylogger steal?

Data type Why criminals want it
Passwords and usernames To take over email, social media and work accounts
Banking and card details To make fraudulent payments or sell the data
Private messages and emails For blackmail, scams or corporate espionage
Business information To steal trade secrets or plan further attacks
Personal identity details For identity theft and fraudulent applications
Search and browsing activity To profile victims for targeted scams

Advanced spyware often combines keylogging with screenshots, clipboard monitoring and webcam access, building a detailed picture of a victim’s activity. Even a few days of captured typing can expose enough information to compromise several accounts, which is why fast detection and password changes matter so much.

What are the warning signs of a keylogger?

  • Your device is unusually slow or lags when typing.
  • Unknown programs, processes or browser extensions appear.
  • Security software is disabled without your action.
  • Strange network activity or high data usage.
  • Typed characters appear with a delay or the mouse moves oddly.
  • Unexpected login alerts, password reset emails or account takeovers.
  • A small unfamiliar device is plugged into a USB port or between keyboard and computer.

Many keyloggers show no obvious signs, so prevention and regular scanning matter more than waiting for symptoms.

How do you detect and remove a keylogger?

  1. Run a full scan with reputable, up-to-date security software.
  2. Check installed programs and browser extensions, and remove anything you do not recognise.
  3. Review running processes and startup items for unknown entries.
  4. Physically inspect keyboard cables and USB ports for unfamiliar devices.
  5. Update your operating system, browser and apps.
  6. If an infection is confirmed, change passwords from a different, clean device.
  7. For serious infections, back up important files and consider a full system reset or professional help.
BTS Magazine Tip
After removing malware, change your most important passwords first: email, banking and your password manager. Your email account is often the key to resetting everything else.

How can you protect yourself from keyloggers?

  • Keep software updated: patches close security holes malware uses
  • Use reputable security software: with real-time protection
  • Enable multi-factor authentication: a stolen password alone is not enough to log in
  • Use a password manager: autofill means fewer passwords are typed manually
  • Avoid suspicious links and downloads: only install apps from trusted sources
  • Limit browser extensions: install only well-known, necessary ones
  • Use passkeys where offered: they replace typed passwords with device-based login
  • Lock devices and control physical access: especially in shared spaces
  • Be cautious on public computers: avoid logging into sensitive accounts

The UK National Cyber Security Centre and the US CISA both publish practical guidance on staying secure online.

Example
Aisha’s email password was captured by a keylogger hidden in a free PDF tool. Because she had multi-factor authentication enabled, the attacker’s login attempt was blocked and she received an alert, giving her time to clean her laptop and change passwords.

How should businesses defend against keyloggers?

  • Use endpoint detection and response (EDR) tools on all devices.
  • Restrict admin rights so users cannot install unapproved software.
  • Train staff to recognise phishing and suspicious attachments.
  • Require multi-factor authentication for all business systems.
  • Control and audit USB device usage.
  • Monitor network traffic for unusual outbound connections.
  • Have an incident response plan ready.

Securing remote teams is especially important; see our guide to remote collaboration tools for security tips. As AI agents gain access to systems, strong AI governance also helps limit damage from stolen credentials.

Try this today
Turn on multi-factor authentication for your email and banking accounts, and review your browser extensions, removing any you do not use.

Frequently Asked Questions

Is a keylogger a virus?

A keylogger is a type of spyware. It is often delivered by viruses, trojans or other malware, but the keylogging function itself is spyware.

Can antivirus detect keyloggers?

Good security software detects many software keyloggers, but hardware keyloggers cannot be detected by software and need a physical check.

Are keyloggers illegal?

Installing a keylogger on someone else’s device without consent to capture their information is illegal in many countries. Some monitoring uses are legal with proper consent and policies.

Can keyloggers work on phones?

Yes. Malicious apps and fake keyboards can record typing on smartphones, especially if installed from untrusted sources.

Does a password manager protect against keyloggers?

It helps, because autofilled passwords are not typed, but it is not a complete defence against all malware.

How do I know if my computer has a keylogger?

Look for unknown programs, odd performance, disabled security tools and suspicious account activity, and run a full security scan.

Final Thoughts

  • A keylogger records what you type, often to steal passwords and data.
  • Types include software, hardware, browser-based and mobile keyloggers.
  • Phishing, malicious downloads and physical access are common infection routes.
  • Updates, security software, MFA and password managers reduce risk.
  • Businesses should add EDR, restricted admin rights and staff training.

Explore More on BTS Magazine