Is it safe to open a RAR file?

Updated November 16, 2026

In short

Opening or extracting a RAR file doesn’t run anything, so the archive itself is not the danger. The risk is in the files inside, such as apps, scripts or documents with macros, and in where the archive came from. Check the source, look at what’s inside before opening anything, and never run a program you weren’t expecting.

A RAR file is a container, like a ZIP: opening or extracting it copies files out, and nothing inside is run. So the archive itself is rarely the problem. What matters is what’s inside and where it came from. A RAR from a colleague with the photos you asked for is as safe as the photos; an unexpected RAR attached to an “unpaid invoice” email deserves suspicion whatever its format.

Why archives are used to deliver harmful files

There is nothing special about RAR. Attackers use archives of every kind (RAR, ZIP, 7z, ISO) for the same practical reasons:

  • an archive can bundle several files, and its contents aren’t visible in an email preview;
  • some email filters block certain file types but pass archives on;
  • a password-protected archive can’t be inspected by a mail scanner or antivirus software, because its contents are encrypted until someone types the password.

None of this makes archives dangerous to open. It means the usual caution about downloads applies to the files inside, with a few extra tricks to know about.

What to look out for inside

Files that run something

The real risk is any file that executes code when you open it:

  • Programs and installers: .exe, .msi, .scr, .com, .bat, .cmd on Windows; .app, .pkg, .command on a Mac. A RAR you expected to contain documents should not contain any of these.
  • Scripts: .js, .vbs, .ps1, .sh, .py, and similar.
  • Shortcuts and disk images: Windows .lnk shortcuts can launch commands; a disk image (.iso, .dmg) can carry an app inside.
  • Documents with macros: Office files can contain macros, especially .docm, .xlsm and .pptm. If a document asks you to “enable content” or “enable editing” to see it properly, close it.

Plain photos, music, videos, text files and PDFs opened in a current viewer are far less risky, though no file type is risk-free with outdated software.

Double extensions and disguised names

Windows hides known file extensions by default, and macOS hides many of them too. A file called Invoice.pdf.exe can appear as Invoice.pdf, perhaps with a PDF-looking icon, while actually being a program. Other tricks include long runs of spaces before the real extension, or names like Photo_2026.jpg .scr.

Look at the full name and the Kind column (in Finder, Command-I on a file shows it). On Windows, turning on file name extensions in File Explorer’s View settings makes this trick obvious.

Path tricks inside the archive

Each file in an archive has a stored path, such as Holiday/beach.jpg. A deliberately crafted archive can store paths like ../../somewhere/else that try to write files outside the folder you extract to, for example into a startup folder. Archive tools are supposed to reject these, and modern ones do, but several well-known extractors have had bugs of this kind over the years. That is the strongest reason to keep your archiver up to date.

The OpenRAR browser tool is not exposed to this: it keeps every file inside its folder, lists it, and lets you save it. It runs nothing from the archive.

Very large expansion

Some archives are built to expand into an enormous amount of data from a small file, to fill a disk or crash a scanner. It’s an annoyance more than a threat on a personal computer, but if a small download claims to unpack into hundreds of gigabytes, don’t extract it. The OpenRAR browser tool stops at about 2.5 GB unpacked on a computer.

How your computer helps

Modern systems add layers of protection, but none of them replace judgement:

  • On a Mac, files downloaded from the internet are marked as such, and Gatekeeper checks apps the first time you open them, warning about software that isn’t signed and notarised by an identified developer. Treat an “unidentified developer” warning on something from an archive as a reason to stop, not an obstacle to click past.
  • On Windows, Microsoft Defender scans files when they’re extracted or opened, and Office opens documents from the internet in Protected View and can block their macros.

A password-protected archive defeats scanning until it’s extracted, which is exactly why you should be more careful with one you didn’t expect.

A practical checklist

Before opening a RAR file:

  1. Did you expect it? An archive you asked for, from someone you know, is low risk. An unexpected one, even from a known address, could come from a hacked account: check with the sender by another channel.
  2. Does the source make sense? Archives from official sites are fine; cracked software, “free” paid apps and random file-sharing links are a common route for malware.
  3. Look before you open. List the contents first. With the OpenRAR browser tool, you see every file name, folder and size without extracting anything to your disk.
  4. Does the content match the story? Photos should be images, invoices should be PDFs. A program or script where you expected documents is a red flag.
  5. Check the full file names. Watch for double extensions and odd spacing.
  6. Be wary of unexpected passwords. An archive with “the password is 1234” in the same email is a classic way to get past scanners.
  7. Don’t enable macros in documents that arrived in an archive.
  8. Scan if unsure. Your antivirus can scan the extracted files. Online scanners exist too, but files you upload to them may be shared with security companies, so don’t upload anything private.
  9. Keep your archiver and system up to date, so known extractor bugs are fixed.

A note on online extractors

Many “open RAR online” sites upload your archive to their servers, extract it there, and let you download the result. That doesn’t usually harm your computer, but it does hand your files to someone else. OpenRAR works differently: the extractor runs in your browser tab, the archive never leaves your device, and once the page has loaded it works offline. It opens RAR4 and RAR5 archives up to about 2 GB on a computer, including archives split into parts and password-protected ones, for which it asks the password; the password stays on your device too.

If the archive turns out to be damaged rather than suspicious, Fixing a corrupt RAR file explains what can be done. And for what a RAR is in the first place, see What is a RAR file?.

Open your archive now.

OpenRAR opens RAR, 7z, ZIP and more in your browser, for free. Nothing to install, nothing uploaded.

Open RAR online

Questions.

Can a RAR file contain a virus?

Yes, it can contain any kind of file, including malicious programs. But the harmful file only does something if it is run or opened. Listing or extracting the archive doesn’t run it.

Is it safe to extract a RAR file?

Extracting copies the files to your disk without running them, so it’s generally safe with an up-to-date tool. The decision that matters comes next: whether to open what came out.

Why would someone send a password-protected RAR?

Often for privacy, which is legitimate. But an encrypted archive also can’t be scanned by email filters or antivirus software until it’s opened, so unexpected protected archives with the password in the same message deserve extra suspicion.

Is opening a RAR file online safe?

It depends on the site. Many online extractors upload your archive to their servers. OpenRAR opens it in your browser instead: nothing is uploaded, files are only listed and saved, and nothing inside is run.