iPhones rarely get viruses, but malware and scams can still harm you
An actual virus — code that copies itself and spreads — is extremely rare on iPhone because Apple's system design makes it nearly impossible. What you're more likely to encounter is malware disguised as an app, a scam website that tricks you into giving up passwords, or spyware installed through a link you clicked. The good news: you can remove these threats yourself without paying for cleaning apps or taking your phone to a repair shop.
The steps differ depending on what you're dealing with. If you suspect a fake app is the problem, you delete it. If you clicked a suspicious link, you clear your browser data. If someone has your password, you change it. This guide walks you through each scenario so you know exactly what to do.
Key Takeaways
- Delete any app you don't recognize or that asks for unusual permissions like access to your photos or location when it shouldn't need them.
- Clear your Safari browsing history, cookies, and website data through Settings > Safari > Clear History and Website Data if you've visited suspicious websites.
- Change your Apple ID password and enable two-factor authentication to prevent unauthorized access to your accounts and data.
- Restart your iPhone in Recovery Mode and restore from a backup only if you believe your phone has been seriously compromised, which is rare.
- Avoid downloading cleaning apps or antivirus software — they cannot actually scan your iPhone's system and are often scams themselves.
Identify which apps are actually the problem
Start by looking at what's installed on your phone. Go to Settings > General > iPhone Storage to see every app and how much space it uses. Look for apps you don't remember downloading, apps with names that seem off (like "System Cleaner" or "Battery Doctor"), or apps from developers you don't recognize.
Pay special attention to apps that ask for permissions they shouldn't need. Open Settings > Privacy and scroll through each category — Location, Contacts, Photos, Microphone, Camera. If a flashlight app is asking for access to your contacts, or a weather app wants your location history, those are red flags. Tap each permission and see which apps are listed. Remove any that don't make sense.
Apps from Apple's App Store are scanned before they go live, so the risk is lower than from other sources. But scam apps do slip through. If you sideloaded an app (installed it outside the App Store), delete it immediately. Go to Settings > General > iPhone Storage, find the app, tap it, and tap "Remove App" then "Delete App".
Clear your browser and remove fake login pages
If you've visited websites that looked like your bank or email login but felt off, or if you entered a password somewhere you're now unsure about, clear your Safari data. Go to Settings > Safari > Clear History and Website Data. Choose "All time" to remove everything, then tap "Clear History and Website Data".
This removes cookies (small files websites use to track you), cached images and data, and your browsing history. It won't delete your bookmarks or saved passwords unless you specifically choose those options, which you don't need to do here.
If you think you entered your Apple ID password on a fake login page, change it right now. Go to Settings > [Your Name] > Password & Security > Change Password. Use a password you've never used before — at least 12 characters, mixing letters, numbers, and symbols. Then turn on two-factor authentication if it's not already on: Settings > [Your Name] > Password & Security > Two-Factor Authentication > Turn On.
Check your Apple ID and payment methods for unauthorized access
Go to Settings > [Your Name] > Password & Security > Apps & Websites. Look at the list of apps and services that have permission to access your Apple ID. If you see anything you don't recognize or don't use anymore, tap it and select "Stop Using Apple ID".
Next, check your payment methods. Go to Settings > [Your Name] > Payment & Shipping. Review the credit cards and payment methods listed. If you see one you didn't add, tap "Edit" and remove it. Then check your recent purchases: Settings > [Your Name] > Media & Purchases > Purchase History. Scroll through the last month or two and look for apps or subscriptions you didn't buy. If you find unauthorized charges, tap the item and select "Report a Problem".
If you see subscriptions you don't remember starting, go to Settings > [Your Name] > Subscriptions and review the list. Tap any subscription you want to cancel and select "Cancel Subscription". Many scam apps hide recurring charges here.
Restart your iPhone to clear temporary malware
Some malware only runs while your phone is on. A full restart can remove it. Press and hold the side button and either volume button until the power-off slider appears. Drag the slider to turn off your phone, wait 30 seconds, then press and hold the side button again until the Apple logo appears.
This is safe to do anytime and won't delete anything. If the suspicious behavior stops after a restart, the threat was likely temporary. If it continues, move to the next step.
Restore from a backup only if you believe your phone is seriously compromised
Restoring your iPhone erases everything and reinstalls the operating system from scratch. Do this only if you've found active malware that won't go away after deleting the app and restarting, or if you believe someone has remote access to your phone (for example, if apps keep opening on their own or your phone is extremely slow despite having storage space).
Before you restore, back up your data if you haven't recently. Go to Settings > [Your Name] > iCloud > iCloud Backup > Back Up Now. Wait for the backup to finish.
Then go to Settings > General > Transfer or Reset > Erase All Content and Settings. Follow the prompts. Your phone will restart and walk you through setup. When asked, choose "Restore from iCloud Backup" and sign in with your Apple ID. Select the most recent backup that was made before you think the infection started.
This process takes 30 minutes to an hour depending on your backup size and internet speed. Don't interrupt it or turn off your phone while it's running.
Why antivirus apps and cleaners don't work on iPhone
You may see ads for apps that claim to scan your iPhone for viruses, clean junk files, or speed up your phone. These don't work the way they claim, and many are scams designed to get your money or your data.
Apple's system design prevents any app — including antivirus software — from scanning the entire operating system or other apps' files. An app can only access its own data and certain shared areas you've given it permission to use. So a "virus scanner" app cannot actually scan for viruses. It can only scan the files it's allowed to see, which means it's not finding threats — it's just showing you fake results to convince you to pay for a "premium" version.
Cleaning apps that promise to delete junk files or speed up your phone also don't work as advertised. iPhone manages its own storage and memory automatically. Deleting cached files doesn't make your phone faster because the cache rebuilds immediately. If your phone is slow, the cause is usually a full storage drive, too many apps running, or an actual malware app — not junk files that need cleaning.
The safest approach is to ignore these apps entirely. If you've already installed one, delete it the same way you'd delete any other app.
Frequently Asked Questions
Can I get a virus just from visiting a website?
Visiting a website alone won't infect your iPhone. However, a malicious website can trick you into downloading a fake app, entering your password, or clicking a link that installs malware. The infection comes from what you do on the site, not from viewing it. Avoid clicking links in text messages or emails from people you don't know, and don't download apps from anywhere except the App Store.
What does it mean if my iPhone keeps asking for my password?
Repeated password prompts usually mean an app is trying to access your account or an old password is cached somewhere. Go to Settings > [Your Name] > Password & Security and change your Apple ID password. Then go to Settings > Apps & Websites and remove access for any apps you don't recognize. If the prompts continue, restart your phone.
Is it safe to use public WiFi on my iPhone?
Public WiFi itself isn't dangerous, but data sent over it can be intercepted. Avoid logging into banking apps, email, or social media on public WiFi. If you must, use a VPN app from a trusted provider like Mullvad or ProtonVPN, which encrypts your traffic. For everyday browsing, public WiFi is fine — just don't enter passwords.
Do I need to do anything if I clicked a suspicious link?
If you clicked a link but didn't enter any information or download anything, you're likely fine. If the link took you to a login page and you entered your password, change that password immediately. If you downloaded an app from the link, delete it and clear your Safari data as described above.
Will restoring my iPhone delete my photos and messages?
Restoring erases everything on your phone, but if you restore from an iCloud backup, your photos, messages, and other data come back. Choose a backup made before you think the infection started. If you're worried the backup itself contains malware, you can restore without a backup and manually re-download your photos from iCloud.com after setup is complete.