How to Share Host Folders with Windows Sandbox in Windows 11
Windows Sandbox folder sharing lets you move files between your main PC and a temporary testing space. Windows Sandbox is a built-in feature that creates an isolated desktop environment on your computer. You can run untrusted apps and test files in it without putting your main system at risk. When you close the sandbox, everything inside it is discarded.
Microsoft added host folder sharing in Windows 11 build 27686.1000 to make file transfers faster. If you can’t find the share option in the steps below, check that your Windows 11 build is new enough to include it.
Windows Sandbox works on Windows 11 Pro, Enterprise, and Education editions. It is not available on Windows 11 Home. It also has to be turned on first (Windows Features), and your PC needs hardware virtualization enabled in the BIOS or UEFI. If Sandbox doesn’t appear in the Start menu , one of those is usually the reason.
Open Windows Sandbox, click the three-dot button at the top right of its title bar, select Share folder, then choose your folder in the File Explorer dialog and click Select Folder. The folder appears inside the sandbox immediately. To share the same folders automatically each time, create a.wsb configuration file with a MappedFolder entry instead. This requires Windows 11 Pro, Enterprise, or Education.
Share a host folder with a sandbox environment
Shared folders let you pass files back and forth between your main PC and the virtual desktop. You can share any folder on your computer from the Sandbox menu. The temporary desktop gets access to those files, and you don’t have to change anything else on your main system. Use this method when you only need a folder for the current session.
- enable and open the Sandbox app from the Start menu . A new Sandbox window opens with a clean desktop. Wait for it to finish loading.
- Click the 3 dots button at the top right of the Sandbox app’s title bar.
- Select Share folder. A File Explorer dialog box opens on your host PC.

- Browse to the folder on your host PC that you want to share, and select it.

- Click the Select Folder button in the File Explorer dialog box. The folder is now shared with the sandbox, and you can open it from inside the sandbox.
- Repeat steps 2 to 5 for every other folder you want to share.
Anything you expose to the sandbox is something that software running in it can reach. To stop sharing, close the sandbox and start a new one without adding the folder again.
Share a folder with Windows Sandbox using WSB file
If you want the same folders every time, use a configuration file. Shared folders can load automatically each time you launch Sandbox from a file with a .wsb extension. You add a few lines of code to the file to map your host folder. This saves you from selecting the folder by hand every time you open the sandbox.
- On the host computer, create a text file with a WSB extension (for example, sandboxmap.wsb). If you only see "sandboxmap.wsb.txt", turn on file name extensions in File Explorer under View Show File name extensions, then rename the file. If you use Notepad, set Save as type to All files so it doesn't add .txt.
- Add the lines below to the file and save it. This maps a folder as read-only, so the sandbox can open your files but can't change them.
<Configuration>
<MappedFolders>
<MappedFolder>
<HostFolder>C:UsersRichardDownloads</HostFolder>
<ReadOnly>true</ReadOnly>
</MappedFolder>
</MappedFolders>
</Configuration>
Replace the highlighted folder location with the path to your own folder.
This maps the folder with read and write access. Use it with care, because anything running in the sandbox can then modify or delete files in that folder on your real PC.
<Configuration>
<MappedFolders>
<MappedFolder>
<HostFolder>C:UsersRichardDownloads</HostFolder>
<ReadOnly>false</ReadOnly>
</MappedFolder>
</MappedFolders>
</Configuration>
- Double-click the WSB file you created (keep it on your desktop for easy access) whenever you want to start Sandbox with the mapped folders. Sandbox opens as usual.
The sandbox now maps the folder on launch. To change which folder is shared, or to switch between read-only and read/write, edit the WSB file and save it. The change takes effect the next time you start Sandbox from that file.
Conclusion:
- Windows Sandbox in Windows 11 provides a secure, isolated environment for testing untrusted applications and browsing potentially harmful websites.
- Sharing a host folder with Windows Sandbox enables convenient access to files within the virtual environment.
- It's essential to consider potential security risks when exposing host folders to a sandbox environment, as it could lead to system compromise or data theft. Read-only sharing is the safer choice when you don't need to write back.
- Additionally, using a WSB configuration file lets you automatically mount specific folders within the sandbox environment, which gives you a customized and efficient setup.
Have a question about this guide?
Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.
Did this guide fix your problem?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!