How to Use Windows Sandbox to Open Suspicious Files
An invoice arrives as a ZIP from a supplier you have dealt with before, but the wording is slightly off. A friend sends an installer for a small utility they swear by. A download from a forum promises the driver your old scanner needs.

An invoice arrives as a ZIP from a supplier you have dealt with before, but the wording is slightly off. A friend sends an installer for a small utility they swear by. A download from a forum promises the driver your old scanner needs. Each time you face the same choice: open it on the computer that holds your passwords, photos and work files, or delete it and maybe lose something you actually needed.
If you run Windows 10 or 11 Pro, there is a third option already on your machine and switched off by default. Windows Sandbox opens a clean, temporary copy of Windows in a window, lets you run the file there, and throws the whole thing away when you close it. It is not perfect protection, and I will be clear about its limits, but it changes "open it and hope" into "open it somewhere disposable first".
What Windows Sandbox actually is
Sandbox is a lightweight virtual machine built into Windows. When you start it, Windows creates a fresh desktop that shares the same version of Windows as your computer but has its own separate file system, registry and running programs. Nothing installed or changed inside it touches your real system. When you close the window, everything inside is deleted for good; the next launch starts from a clean slate again.
It uses Hyper-V, the same virtualisation technology Microsoft uses in its data centres, which is why it starts in about 10 to 20 seconds instead of the minutes a full virtual machine takes. You do not need a licence key, an ISO file or any setup inside it.
Requirements, from Microsoft's own documentation: Windows 10 or 11 Pro, Enterprise or Education (not Home), a 64-bit processor with virtualisation enabled in the BIOS or UEFI, at least 4 GB of RAM with 8 GB recommended, and about 1 GB of free disk space.
Turning it on and using it
The first setup takes around five minutes including a restart.
- Check that virtualisation is enabled. Open Task Manager, go to the Performance tab, select CPU, and look for "Virtualization: Enabled" at the bottom right. If it says disabled, you need to turn on Intel VT-x or AMD SVM in your BIOS settings.
- Enable the feature. Press the Windows key, type "Turn Windows features on or off", open it, tick Windows Sandbox and click OK.
- Restart when Windows asks.
- Launch Windows Sandbox from the Start menu. A window opens with a fresh desktop.
- Copy the suspicious file in. Copy it on your real desktop with Ctrl+C, click inside the Sandbox window and paste with Ctrl+V. Drag and drop does not work by default.
- Open it and watch. Run the installer, open the document, extract the archive. Note what happens: unexpected windows, a command prompt flashing, a request for admin rights a PDF should never need, or nothing at all from a file that claimed to be a program.
- Close the window when you are done. Windows asks you to confirm that everything will be discarded. Confirm.
Do not copy anything back out of the Sandbox unless you are sure about it. That is the one bridge back to your real system.
Locking it down further with a config file
By default, Sandbox has internet access and a shared clipboard with your host. For suspicious files, I would turn both off. You do this with a small text file that ends in .wsb, which is a short XML configuration Windows reads when you double-click it.
Open Notepad and create a file with a <Configuration> block containing <Networking>Disable</Networking> and <ClipboardRedirection>Disable</ClipboardRedirection>. Save it as something like Offline-Sandbox.wsb on your desktop. Double-clicking it launches a Sandbox with no network and no shared clipboard.
Without the clipboard, you need another way to get the file in. Add a <MappedFolders> section that points at one folder on your real disk, for example C:\Quarantine, and set <ReadOnly>true</ReadOnly>. The folder appears on the Sandbox desktop, the file can be opened, but nothing inside the Sandbox can write back to it. Keep that folder empty except for the file you are testing.
I keep two .wsb files: one offline and read-only for anything I distrust, and the default for things I merely want to try, like a new utility I want to test before installing it properly.
Where people expect too much from it
The common advice online is that Sandbox makes it safe to run anything. I would push back on that, because it leads people to take risks they would not take otherwise.
First, with default settings the Sandbox is on your network. Malware running inside it can reach the internet, download more code and, in some cases, probe other devices on your home or office network. That is why the offline config above matters for anything genuinely suspicious.
Second, a lot of modern malware checks whether it is running in a virtual machine and, if so, does nothing. A file that behaves quietly in the Sandbox has not been proven safe. It may simply be waiting for a real computer. Sandbox is good at catching obvious nasties and at letting you look at a document without risk; it is weak as a verdict on whether something is clean.
Third, what you type inside the Sandbox is still typed by you. If a document inside asks you to log in to Microsoft 365 to view it, and you do, your password is gone. The isolation protects your files, not your credentials. A login prompt inside a document is a strong sign of phishing, which our guide to checking a link before you click covers from another angle.
Escape vulnerabilities exist in theory, and Microsoft pays bounties when researchers find them. For a home user or a small office, they are not the realistic risk. The three points above are.
A routine for files you are unsure about
For anything that arrives unexpectedly, I follow the same order. Scan it first with Microsoft Defender by right-clicking and choosing Scan, which catches known threats in seconds; the settings in Defender settings worth turning on make that scan more thorough. If it passes but still feels wrong, open it in the offline Sandbox. If it asks for credentials, macros or admin rights it should not need, delete it and contact the sender by phone or a separate message, not by replying.
On Windows Home, Sandbox is not available. The closest free option is opening documents in a browser viewer rather than desktop apps, and uploading suspicious files to an online multi-engine scanner, keeping in mind that anything you upload may become visible to researchers.
This week, enable Sandbox and create the offline .wsb file before you need it. When the odd invoice arrives, you will be glad it takes ten seconds instead of a weekend. More setup guides are in our security tools section.
FAQ
Is Windows Sandbox available on Windows 11 Home?
No. It needs Windows 10 or 11 Pro, Enterprise or Education, plus hardware virtualisation enabled in the BIOS.
Can malware escape Windows Sandbox?
It is rare and would need an unpatched flaw. The bigger risks are network access, malware that hides in virtual machines, and typing passwords inside it.
Does Windows Sandbox keep files after closing?
No. Everything inside is deleted when you close the window, and the next launch starts clean.
How do I turn off internet in Windows Sandbox?
Create a .wsb configuration file with Networking set to Disable, then launch the Sandbox by double-clicking that file.
More in Tools and Software
Tools and Software
Use a Mesh VPN Instead of Port Forwarding at Home
A reader sent me a router screenshot last spring because something felt wrong.
Tools and Software
How to Check Your Home Network for Open Ports Safely
A reader sent me a screenshot last year of a scan showing port 32400 open on his home connection. He did not recognise it.
Tools and Software
How to Set Up a Computer Firewall on Windows and Mac
You have probably clicked "Allow" on a firewall pop up without reading it, or found out months later that the firewall on your...