Windows Sandbox is a disposable desktop that runs on a separate kernel through the Microsoft hypervisor. For untrusted code, disable networking and map the folder you want to inspect as read-only. Closing the sandbox deletes everything inside it, so nothing the code does survives unless you copy it out on purpose.
What it is
Microsoft describes Windows Sandbox as a lightweight isolated desktop environment for safely running applications. It uses hardware-based virtualisation and the Microsoft hypervisor to run a separate kernel, which isolates it from the host.
Properties from the documentation:
- Part of Windows, with no separate VM to maintain.
- Disposable: nothing persists when you close it.
- Pristine: each run is like a fresh Windows install.
- Host-installed software is not available inside.
- Only one instance can run at a time.
Since Windows 11 22H2, data persists through restarts initiated inside the sandbox.
Editions
It is supported on Pro, Enterprise, Pro Education/SE and Education. Microsoft states it is not supported on Windows Home.
The setting that matters
Networking is on by default. Microsoft marks this as important: enabling networking can expose untrusted applications to the internal network. Disable it in the configuration file for anything you do not trust.
For opening untrusted applications or files such as email attachments, Microsoft suggests a sandbox with networking disabled and the folder containing the file mapped in read-only mode. The sample configuration files page has examples; check it for the current syntax rather than copying from memory.
When to use it
Good fits:
- A zip from a stranger that claims to be a sample project.
- An installer you want to try once.
- A script someone pasted that you want to read and run.
- A clean environment to reproduce a bug.
Poor fits:
- Anything that needs your credentials. Do not sign in to real accounts inside a sandbox you are testing malware in.
- Long-running dev environments. The sandbox is temporary by design.
A simple routine
- Write a configuration with networking disabled and a read-only mapped folder.
- Start the sandbox from that file.
- Open or run the item inside.
- Observe what it does, then close the window.
- Do not copy anything back out unless you have inspected it.
If the item needs the network, run a second pass with networking on and no real credentials, and assume anything it fetches is hostile.
What it does not do
A sandbox limits what code does to your machine. It does not tell you whether a package is vulnerable or malicious in your dependency tree. Checking what your project pulls in is a separate step; Safeguard's free scan at gold.safeguard.sh/scan covers dependencies in a repository.
Quick check
Is networking off by default in Windows Sandbox?
No. Networking is on by default and can be disabled with a configuration file.
Does it work on Windows Home?
No. Microsoft says it is not supported on Windows Home.
Sources
Last reviewed: 19 October 2026.