You should never click suspicious links, download files from unsafe websites, or run email attachments from unknown sources.

Still, mistakes happen and you are always in danger of being exposed to unnecessary risk.

If you suspect a file on your computer contains malware, you should not open it under any circumstances. Here's what you should do instead.

How to Check if a File Is Infected With a Virus

Your best option is to scan the file using VirusTotal.

This is a simple online tool that allows anyone to scan a file for malware—it will inspect the potentially problematic file with all sorts of different anti-malware products.

To begin the scan, simply click the Choose file button to post your file. Note that you won't be able to upload a file larger than 600MB.

Screenshot of the VirusTotal website, choose file button

As you can see below, the file we uploaded (an MS Word document) was found to contain no known malware after VirusTotal ran it through over 60 antivirus scanning engines.

Screenshot of a VirusTotal scan of a suspicious file

The entire process usually takes just a few seconds, but it may take longer depending on file size.

And here's what happens when you upload a file that is actually malicious. As you can see below, 51 of the 64 malware search engines VirusTotal used determined that this file we uploaded (a ZIP file) contains malware.

Screnshot of a VirusTotal scan of a malicious file

You can also use VirusTotal to check if a link is safe. Go to VirusTotal, click URL instead of FILE, then paste the link and press the Enter button on your keyboard.

RELATED: 7 Quick Sites That Let You Check If a Link Is Safe

Even if you have strong anti-malware protection installed on your device, you should still utilize VirusTotal—it can't hurt to have a few dozen antivirus products scan a file, as opposed to just one.

The File Contains Malware: Now What?

Just downloading a malicious file won't affect your computer in many cases.

If a VirusTotal scan shows that a file contains malware, immediately delete the file from your computer by selecting it and pressing Shift + Delete on your keyboard.

After that, you should run a full system malware scan.

There are several effective online antivirus scanners that you can use. Though useful, they can't really replace an offline antivirus suite because they don't offer real-time protection, which is why investing in good anti-malware software is highly recommended.