How to Check a File for Viruses

Figuring out how to check a file for viruses can be nerve-wracking, and when you’re worried about a virus or malware on your device, the last thing you need is more stress.

Thankfully, there are some easy ways to check a file for viruses using antivirus software – both on your computer and online.

How to Scan a File for Viruses

There are many situations where you’ll need to check if a file is safe before you download or open it. Maybe a friend or colleague has sent you an attachment, but you’re not sure where it originally came from. Alternatively, you might want to scan a file from an unfamiliar website before you download it to your computer.

In this guide, we’ll walk you through tools you can use to scan a file for viruses directly on your computer and how to check a file for viruses online.

How to Run a Windows Scan for Viruses on a File

If you’re using Windows, you have access to a built-in antivirus tool called Windows Security, also known as Windows Defender. Here are the steps to use Windows Security to scan a file for viruses on your computer on Windows 11:

  1. Windows Security

    Open Windows Security and select “Virus & threat protection.”
    Windows Security
  2. Pick a scan

    Select “Scan options,” then “Custom scan.”
    Pick a scan
  3. Pick a file

    Windows Security will ask you what file or folder you want to scan. Click “Select file” where relevant, and Windows Security will scan it.
  4. Results

    If Windows Security finds a threat, it will present you with options about what to do next.
    Results
  5. Outcome

    If no threat is found, Windows Security will show “No current threats” – it’s determined the file is safe, and you don’t need to take any further action, so you’re all set.
    Outcome

How to Scan a File for Viruses Online

VirusTotal is a good option if you want to scan a file for viruses online. It uses a variety of antivirus databases from different security vendors. Keep in mind, though, that you shouldn’t upload files containing personal or sensitive information.

Here are the steps to upload and scan a file:

  1. First step

    Go to VirusTotal.com.
    First step
  2. Pick a file

    Upload your file – click “Choose file” and select it on your computer, or just drag and drop it into your browser window.
    Pick a file
  3. Scan

    VirusTotal will scan the file using the latest virus data from multiple antivirus providers.
  4. Threat detected

    If VirusTotal detects a threat, it’ll let you know that one or more security vendors have flagged the file as being malicious. You should use antivirus software on your computer to quarantine or remove the file.
    Threat detected
  5. All clear

    If no threat is detected, VirusTotal will let you know. The file is likely safe, and you don’t need to do anything further.
    All clear

What to Check After Using a Virus File Scanner

After you scan a file for viruses, you might wonder what to do next. If the scan came back clear, but you still have suspicions about the file, for example, then there are a few things to check.

Firstly, if you’re concerned about a file, you can check to see if the file has a listed publisher. Right-click on the file and check its properties.

If it’s from a legitimate software company, such as Microsoft, this should be listed. If there’s no publisher shown or you don’t recognize the company, it’s best not to use the file without further research. “Are .exe files safe?” is a common question, and of course, you should be particularly wary of them.

Check the publisher's name on an exe file

False positive results are possible when using antivirus software file checkers. If you know you want to use a file and think it’s safe, you might consider testing it in a sandbox, a virtual environment that’s kept separate from the rest of your computer.

Test a file in Avast's sandbox

Antivirus apps such as Avast offer sandbox environments so you can safely test files and run applications without putting your device at risk.

If you have suspicions about a file, you should continue to monitor its activity on your device, even if you’ve taken these precautions – and using an antivirus app can help you monitor activity in real time.

What Does a Virus Scan Do? Is This File Safe?

You may be wondering, what does a virus scan actually do? Antivirus software scans your computer’s memory for patterns that suggest the presence of malicious software, or “malware,” which includes viruses and other types of threats.

If it finds a threat, antivirus apps generally isolate the file from the rest of your files by placing it in quarantine. This stops the file from interacting with anything else on your device and protects your other files and data from being compromised.

Once a file is in quarantine, your antivirus app will give you options on what to do next, such as removing the file or marking it as safe if it’s a file you trust.

If you find an infected file or folder on your device, it’s a good idea to run a full system antivirus scan since there may be other files that were infected.

You can also schedule regular automatic scans in your antivirus app, so you never have to remember to run a scan manually.

Antivirus Options to Scan Files for Viruses

There are a number of excellent antivirus apps on the market, many of which offer more features than built-in tools like Windows Security and which will support multiple devices with a single subscription. Here are our top five picks:

Antivirus Software Test Results Starting Price Max Devices Supported Compatibility Free Version Top 3 Features
TotalAV 6/6 for protection, performance, and usability $29/year 6 Windows, Mac, iOS, and Android Free scan – Strong phishing protection
– Tracks online activity in real time
– VPN included with upgrades
Norton 6/6 for protection, performance, and usability $19.99/year 10 Windows, Mac, iOS, and Android 30-day trial – Built-in firewall
– Automatic cloud backups
– Password manager
TrendMicro 6/6 for protection, performance, and usability $19.95/year 10 Windows, Mac, iOS, and Android Yes – AI-powered malware detection
– Folder Shield feature
– Cloud-based protection
ESET – 6/6 for usability
– 5.5/6 for protection and performance
$39.99/year 10 Windows, Mac, and Android 30-day trial – Secure browser
– AES-256 disk encryption
– Firewall on all plans
Avast 6/6 for protection, performance, and usability Free / $4.19/month 30 Windows, Mac, iOS, and Android Yes – Great free plan
– Phishing and ransomware protection
– Integrated ad blocker

Check out our guide to the best antivirus software for more details on these options and other file scanners.

More Antivirus Resources

Going beyond this guide, we have a range of other antivirus resources that can help you find answers, whether you’re looking for a file scanner or want to learn more about viruses and antivirus software:

Summary — How to Tell if a Download has a Virus

With the growing number of threats online, we all need to be vigilant. If you’re concerned about the safety of a file you’ve downloaded, it’s a good idea to scan the file for viruses before you open it.

On a Windows computer, scanning a single file is simple – you can use a custom scan in Windows Security to locate and scan the file for threats.

If you want to scan a file for viruses online, VirusTotal is a great online file scanner. You can upload almost any kind of file, and VirusTotal will check it using data from a wide variety of antivirus and security providers.

In the event you find a threat, you need to take action fast to protect your device. Antivirus software can help you quarantine files and test them in a safe sandbox environment so you can mark them as safe or remove them – and however you scan your files for viruses, it’s wise to use an antivirus app to regularly scan your device.

File Virus Scanner FAQs

How do you scan a file for viruses?

How can you check a file for viruses online?

Can you check if a file has a virus before downloading it?

What is a file with a virus?

References

Related How To’s

Related Terms

Harry Werber

Harry is a veteran technology writer who focuses on software, AI and climate tech. He has worked with a range of organizations, from tech startups to enterprise organizations such as Microsoft, Dell and Vodafone. Alongside writing, Harry's experience includes roles leading teams, as well as managing projects, operations, and product development.