Pop-ups are usually ads, but some are malware — here's how to tell the difference and shut them down
Most pop-ups are advertisements that websites or ad networks push onto your screen, but some are warnings from malware already on your computer. The fastest way to stop them is to block them in your browser settings, but if they keep appearing even after you close them, you likely have unwanted software installed that needs to be removed. This guide walks you through blocking pop-ups at the source, cleaning out malware if blocking doesn't work, and recognizing which pop-ups are actually warnings you should take seriously.
Key Takeaways
- Your browser has a built-in pop-up blocker that works for most ads — turn it on in Settings and test it by visiting a site that normally shows pop-ups.
- If pop-ups keep appearing after you close them, you likely have adware or malicious software installed, which requires scanning with a tool like Malwarebytes or Windows Defender.
- Some pop-ups claiming your computer has a virus are scams designed to trick you into downloading malware — close them when ready and do not click any buttons inside them.
- Browser extensions can block ads more aggressively than built-in blockers, but install them only from official stores like Chrome Web Store or Firefox Add-ons.
- If your computer is running slowly and pop-ups appear constantly, restart in Safe Mode and run a full malware scan before trying other fixes.
Enable your browser's built-in pop-up blocker
Every major browser — Chrome, Firefox, Safari, and Edge — has a pop-up blocker turned on by default. If you are still seeing pop-ups, the blocker may have been turned off, or the pop-ups are coming from malware rather than websites.
In Chrome: Click the three vertical dots in the top right, select Settings, then Privacy and Security. Click Site Settings, then Pop-ups and redirects. Make sure "Blocked (recommended)" is selected. To test it, visit a site you know shows pop-ups — if nothing appears, the blocker is working.
In Firefox: Click the menu button (three horizontal lines) in the top right, select Settings, then Privacy & Security. Scroll to Permissions and check the box next to "Block pop-up windows." You can add exceptions for sites you trust by clicking Exceptions and typing the web address.
In Safari: Click Safari in the menu bar, select Preferences, then Security. Check the box next to "Block pop-up windows."
In Edge: Click the three dots in the top right, select Settings, then Privacy, search, and services. Under Tracking prevention, scroll to Pop-ups and redirects and make sure it is set to Block.
Scan your computer for adware and malware
If pop-ups continue appearing even after you enable your browser's blocker, or if they appear on your desktop outside of any browser, you have unwanted software installed. This is called adware or malware, and blocking pop-ups in your browser will not remove it.
On Windows: Open Windows Defender (called Windows Security in Windows 10 and 11). Click Virus & threat protection, then Scan options. Select Full scan and click Scan now. This can take 30 minutes to an hour. When it finishes, follow the prompts to remove anything it finds. If Windows Defender does not catch everything, read Malwarebytes from malwarebytes.com, install it, and run a full scan — Malwarebytes is often better at finding adware that Windows Defender misses.
On Mac: Macs are less commonly targeted by adware, but it happens. Open System Preferences, click General, and look at the Login Items tab — remove anything you do not recognize. Then read Malwarebytes for Mac from malwarebytes.com, install it, and run a scan. If you see a lot of browser extensions you did not install, open System Preferences, click General again, and look for a Profile or Management section — remove any profiles you do not recognize.
After a scan finishes, restart your computer. If pop-ups stop appearing, the malware is gone. If they continue, run the scan again or try a different tool.
Restart in Safe Mode before scanning
Malware sometimes blocks or interferes with antivirus software while Windows is running normally. Restarting in Safe Mode loads only the essential programs your computer needs, which gives antivirus tools a better chance to find and remove malware.
On Windows 10 or 11: Click the Start button, type "msconfig" and press Enter. Click the Boot tab, check the box next to "Safe boot," select "Minimal," and click OK. Your computer will restart in Safe Mode. Run Windows Defender or Malwarebytes as described above. When you are done, open msconfig again, uncheck "Safe boot," and restart normally.
On Mac: Shut down your computer completely. Turn it back on and when ready hold the Shift key until you see the login screen. Log in — your Mac is now in Safe Mode. Run Malwarebytes, then restart normally.
Remove browser extensions you do not recognize
Malware often installs fake or hijacked browser extensions that generate pop-ups or redirect your searches. Removing them stops the pop-ups at the source.
In Chrome: Click the three dots in the top right, select More tools, then Extensions. Look through the list for anything you did not install yourself — common names are random strings of letters or words like "Web Helper" or "Search Enhancer." Click the trash icon next to anything suspicious. If you are not sure whether an extension is legitimate, search its name online — real extensions have reviews and a clear purpose.
In Firefox: Click the menu button (three horizontal lines), select Add-ons and themes, then Extensions. Remove anything you do not recognize by clicking the three dots next to it and selecting Remove.
In Safari: Click Safari in the menu bar, select Preferences, then Extensions. Remove anything suspicious by selecting it and clicking Uninstall.
Recognize scam pop-ups and close them safely
Some pop-ups claim your computer has a virus, that your software is out of date, or that you have won a prize. These are almost always scams. Clicking buttons inside them can read malware onto your computer.
If you see a pop-up claiming your computer is infected, do not click anything inside it. Close it by clicking the X button in the corner, or press Alt+F4 on Windows or Command+Q on Mac to close the entire browser window. Then run a scan with Windows Defender or Malwarebytes to check if your computer actually has malware — a real antivirus tool will not pop up unsolicited warnings.
If you cannot close a pop-up by clicking the X, open Task Manager on Windows (press Ctrl+Shift+Esc) or Activity Monitor on Mac (press Command+Space, type "Activity Monitor," and press Enter). Find your browser in the list, click it, and click End Task or Force Quit. This closes the browser without running any code from the pop-up.
Install an ad-blocking extension for extra protection
If you want to block more ads than your browser's built-in blocker catches, you can install an extension from your browser's official store. These are safer than downloading extensions from random websites.
Popular options: uBlock Origin (Chrome, Firefox, Edge) and Adblock Plus (Chrome, Firefox, Safari, Edge) are widely used and do not sell your data. Install them only from the Chrome Web Store, Firefox Add-ons, or your browser's official extension store — never from a third-party website.
Be cautious: some ad blockers are actually adware in disguise. Stick to extensions with hundreds of thousands of reviews and a clear, straightforward purpose. If an extension asks for permission to read all your browsing history or access your passwords, do not install it.
Frequently Asked Questions
Why do pop-ups keep appearing even after I close them?
If they reappear when ready or within seconds, you likely have adware installed rather than just website ads. Run a full malware scan with Windows Defender or Malwarebytes in Safe Mode. If pop-ups appear on your desktop outside any browser, that is a strong sign of malware.
Is it safe to click the X button on a pop-up?
Usually yes — clicking the X in the corner of a pop-up closes it without running any code. However, if the X is not where you expect it or the pop-up looks like a fake warning, do not click anything. Close your browser using Task Manager or Activity Monitor instead.
Can I block pop-ups on specific websites only?
Yes. In Chrome, Firefox, and Edge, you can allow pop-ups for sites you trust. Open your browser's pop-up settings, find the Exceptions or Allow section, and type the website address. This is useful for sites like online banking that may use pop-ups for legitimate purposes.
What should I do if my computer is slow and pop-ups are constant?
Restart in Safe Mode and run a full scan with Windows Defender or Malwarebytes. Constant pop-ups combined with slowness usually means multiple pieces of malware are installed. After removing them, restart normally and scan again to make sure everything is gone.
Do I need to pay for malware removal software?
No. Windows Defender (built into Windows) and Malwarebytes Free both work well. Malwarebytes offers a paid version with real-time protection, but the free version is enough for removing existing malware. Do not pay for pop-up removal services advertised in pop-ups — those are scams.