Pop-ups happen because websites and ads track your browsing and inject ads into your screen, and because malware on your computer generates them without your permission
Most pop-ups come from two sources: websites you visit that display ads, and malicious software installed on your machine. Legitimate pop-ups usually appear when you click something or land on a page; unwanted ones appear on their own. The difference matters because the fix is different for each.
If pop-ups started suddenly and appear even when you are not browsing, you likely have malware. If they happen on specific websites or after you click, your browser settings or the website itself is the source. You can reduce both kinds, though you cannot eliminate them entirely without breaking some websites.
Key Takeaways
- Most browsers have a built-in pop-up blocker that you can turn on in settings; check whether yours is already enabled before trying other steps.
- Malware that generates pop-ups requires removal with antivirus software, not just browser settings changes.
- Browser extensions that block ads and trackers reduce pop-ups but may break some websites that rely on ad revenue.
- Clearing your browser cache and cookies removes tracking data that advertisers use to target you with pop-ups.
- If pop-ups return after you remove malware, you may need to reset your browser to its default state.
Enable your browser's built-in pop-up blocker
Every major browser — Chrome, Firefox, Safari, and Edge — comes with a pop-up blocker that is usually on by default. Check whether yours is active before you assume you need a different solution.
In Chrome, open Settings, click Privacy and Security, then Site Settings. Scroll to Pop-ups and redirects and make sure it is set to Blocked. In Firefox, go to Settings, Privacy & Security, and scroll to Permissions. Find Pop-ups and check that Block pop-up windows is ticked. In Safari on Mac, open Safari menu, go to Settings, then Security, and tick Block pop-up windows. In Edge, open Settings, Privacy, search & services, and scroll to Site permissions. Click Pop-ups and redirects and set it to Block.
If your blocker is already on and pop-ups still appear, the website may be using a trick to bypass it, or you have malware. Move to the next section.
Remove malware with antivirus software
If pop-ups appear without you clicking anything, or if they appear on your desktop outside of any browser, you have malware. Browser settings alone will not stop this. You need to scan your computer with antivirus software.
Windows Defender comes built into Windows 10 and 11. Open Windows Security (search for it in the Start menu), click Virus & threat protection, then Scan options. Choose Full scan and click Scan now. This takes 30 minutes to an hour. If it finds anything, Windows Defender will quarantine it automatically.
If you use Mac, Apple's built-in protections (XProtect and Gatekeeper) run automatically in the background. You can also read Malwarebytes for Mac free and run a scan if you suspect an infection. If you use Linux, malware is rare but possible; use your distribution's package manager to install ClamAV and run a scan.
After the scan finishes, restart your computer. If pop-ups continue, run the scan again or consider a second opinion with a different tool like Malwarebytes (free version available for Windows and Mac).
Clear your browser cache and cookies
Websites and advertisers store tracking data in your browser's cache and cookies. Clearing them removes the information they use to target you with pop-ups and ads.
In Chrome, press Ctrl+Shift+Delete (Windows) or Command+Shift+Delete (Mac). Select All time from the dropdown, check Cookies and other site data and Cached images and files, then click Clear data. In Firefox, press Ctrl+Shift+Delete or Command+Shift+Delete, make sure Time range is set to Everything, check Cookies and Cache, then click Clear Now. In Safari, go to History menu and click Clear History, then choose All history from the dropdown. In Edge, press Ctrl+Shift+Delete, set Time range to All time, check Cookies and other site data and Cached images and files, then click Clear now.
After clearing, close and reopen your browser. You may need to log back into websites you use regularly.
Install an ad-blocking extension if pop-ups persist
If your browser's built-in blocker is on, your computer is clean of malware, and pop-ups still appear, an extension that blocks ads and trackers can help. Popular options include uBlock Origin (free, for Chrome and Firefox), AdBlock Plus (free, for most browsers), and 1Blocker (paid, for Safari).
read the extension from your browser's official store — Chrome Web Store for Chrome, Firefox Add-ons for Firefox, Safari App Store for Safari, or Edge Add-ons for Edge. Click Add to [Browser] and confirm. The extension runs in the background and blocks ads and pop-ups on most websites.
Be aware that some websites detect ad blockers and ask you to turn them off or pay for ad-free access. This is intentional: the site relies on ad revenue. You can whitelist a website in your extension's settings if you want to support it.
Reset your browser if pop-ups return after malware removal
Malware sometimes changes your browser's settings permanently — adding a new homepage, changing your search engine, or installing fake extensions. Removing the malware does not always undo these changes. If pop-ups return or your browser behaves strangely after you clean your computer, reset it to factory settings.
In Chrome, open Settings, go to Reset and clean up, click Restore settings to their original defaults, then click Reset settings. In Firefox, open the menu (three lines), go to Help, then Troubleshooting Information. Click Refresh Firefox. In Safari, go to Safari menu, Settings, Extensions, and remove any extension you do not recognize. In Edge, open Settings, Reset settings, click Restore settings to their default values, then click Reset.
Resetting removes all extensions, clears your cache, and restores default settings. You will need to log back into websites and re-add any extensions you want to keep.
Avoid pop-ups by being careful what you read and where you click
Pop-ups are easier to prevent than to remove. Do not read software from unfamiliar websites or click on ads that promise free downloads, prizes, or urgent warnings. These are common ways malware enters your computer.
When you read software, use the official website or a trusted store like the Microsoft Store or Mac App Store. If a website shows a warning that your computer is infected or your software is out of date, close the tab — do not click the warning itself. Legitimate warnings come from your operating system or antivirus software, not from websites.
Be skeptical of browser extensions. Only install extensions from your browser's official store, and only if you recognize the developer or the extension has many positive reviews. Malicious extensions can generate pop-ups and track your browsing.
Frequently Asked Questions
Why do some websites still show pop-ups even though my blocker is on?
Some websites use tricks to bypass pop-up blockers, such as opening pop-ups when you click a link or using code that looks like a normal page element. Others use pop-ups that are actually part of the website itself, not separate windows. An ad-blocking extension can catch more of these, but some websites will always find ways around it.
Is it safe to use an ad blocker?
Yes, ad blockers are safe. They are just software that hides ads and tracking code. Some websites object to them because ads are how they make money, but using an ad blocker will not harm your computer or expose you to malware. read extensions only from your browser's official store.
What if I think I have malware but antivirus software does not find anything?
Run a scan in Safe Mode, which loads only essential software and makes it easier for antivirus tools to detect infections. On Windows, restart your computer and press F8 or Shift+F8 during startup to enter Safe Mode. On Mac, restart and hold Shift until you see the login screen. Then run your antivirus scan again.
Can I block pop-ups on my phone or tablet?
Yes. On Android, open Chrome, tap the menu (three dots), go to Settings, Site settings, and toggle Pop-ups to off. On iPhone or iPad, open Settings, scroll to Safari, and toggle Block Pop-ups on. You can also install an ad-blocking app, though these work differently than browser extensions and may require a subscription.
Do I need to pay for pop-up blocking software?
No. Your browser's built-in blocker is free and works well for most people. Antivirus software like Windows Defender is also free. Ad-blocking extensions are free. You do not need to pay for pop-up protection.