Windows Sandbox is a lightweight desktop environment designed to safely run untrusted applications in isolation. When the Sandbox is closed, all software, files, and changes are discarded. By default, Sandbox supports Windows clipboard sharing, allowing copy-and-paste operations between the host and the Sandbox. However, disabling this feature increases isolation by preventing data exchange across environments.
This is especially useful for strengthening security, preventing data leakage, and ensuring compliance in regulated environments. This guide will show you how to enable and disable clipboard sharing with Windows Sandbox on Windows 10.
How to enable or disable clipboard sharing
Before proceeding, make sure you meet the following requirements:
- You are using Windows 10 Pro or Enterprise, build 18342.
- The Windows Sandbox feature is enabled (see the section below for steps on enabling it in Windows 10).
- Virtualization is enabled in BIOS/UEFI.
- You have administrative privileges to configure .wsb configuration files.
Once these are met, follow the steps below to enable or disable clipboard sharing with Windows Sandbox:
Create or edit a Sandbox configuration file
- Press Win + S to open the search bar.
- Type Notepad and click on it in the results.
Insert clipboard sharing configuration
- Paste one of the following configurations inside the Notepad file.
-
- To enable clipboard sharing, use:
<Configuration>
<ClipboardRedirection>Enable</ClipboardRedirection>
</Configuration>
-
- To disable clipboard sharing, use:
<Configuration>
<ClipboardRedirection>Disable</ClipboardRedirection>
</Configuration>
Save and run the Sandbox
- Click File > Save As.
- Enter a filename and save it with a .wsb extension.
-
- Example: CustomSandbox.wsb
Note: Clipboard sharing is controlled via a .wsb (Windows Sandbox configuration) file.
- Set Save as type to All Files.
- Set Encoding to UTF-8.
- Click Save.
- Double-click the file you created to launch Windows Sandbox with the specified configuration.
Note that these settings only apply when Windows Sandbox is launched via the .wsb file you created. Opening Sandbox through the default shortcut will not use your custom configuration.
Notes and additional options
Other .wsb configuration options
You can also combine clipboard settings with other features such as folder mapping, networking, or GPU support:
<Configuration>
<ClipboardRedirection>Enable</ClipboardRedirection>
<MappedFolders>
<MappedFolder>
<HostFolder>C:\Test</HostFolder>
<ReadOnly>true</ReadOnly>
</MappedFolder>
</MappedFolders>
<Networking>Enable</Networking>
<VGpu>Enable</VGpu>
</Configuration>
These options give you greater flexibility when setting up a secure and functional Sandbox environment tailored to your testing or administrative needs.
Default behavior
If you don’t use a configuration file, clipboard sharing is enabled by default.
Security considerations
Disabling clipboard sharing improves Sandbox isolation, which is recommended when running untrusted or potentially harmful software inside the Sandbox.
How to enable the Windows Sandbox feature in Windows 10
If the Windows Sandbox feature isn’t enabled, you won’t be able to configure clipboard sharing. Here are simple steps to enable Windows Sandbox in Windows 10:
- Press Win + R to open the Run Dialog box.
- Type
optionalfeatures.exe
and click Enter to open the Windows Features. - Scroll down and check the box next to Windows Sandbox.
- Click OK, then restart your PC if prompted.
Troubleshooting common issues
Issue: Sandbox doesn’t launch
If Windows Sandbox isn’t launching, it may not be enabled in your system settings. To enable it:
- Press Win + S to open the search bar.
- Type Control Panel and select it from the results.
- Click Programs.
- Under Programs and Features, tap Turn Windows features on or off.
- Check the box next to Windows Sandbox.
- Click OK, then restart your computer if prompted.
Issue: Clipboard still works after setting Disable
Make sure you’re launching Windows Sandbox using the correct .wsb file and that it’s properly formatted. To verify:
- Right-click the .wsb file and choose Open with > Notepad.
- Confirm that it contains exactly the following:
<Configuration>
<ClipboardRedirection>Disable</ClipboardRedirection>
</Configuration>
- Ensure there are no typos, spaces, or missing tags.
- Save the file, then double-click it to launch Windows Sandbox with the updated settings.
Issue: File associations not recognized
Remember that Windows Sandbox starts with a default Windows environment every time. This means custom file associations or non-default apps may not be recognized. However, to ensure the .wsb file loads correctly, verify that it’s saved with UTF-8 encoding and follows a valid XML structure to prevent formatting errors.
Frequently Asked Questions (FAQ)
What is the purpose of Windows Sandbox?
Windows Sandbox is designed to run applications in isolation safely. It allows you to test software, browse untrusted websites, or execute potentially harmful files and scripts without risking your main system. Each time you open the Sandbox, it launches a clean copy of Windows. When you close it, all changes, files, and installed apps are completely erased.
What is clipboard sharing?
Clipboard sharing is copying and pasting text, files, or other data between your host system and the Windows Sandbox. This feature helps transfer bits of information easily during testing.
Can I dynamically toggle clipboard sharing while the Sandbox is running?
No. Clipboard sharing settings are applied only at launch via the .wsb configuration file. Once the Windows Sandbox runs, you cannot restrict or allow clipboard access without closing and relaunching it with a new configuration.
Can I disable clipboard sharing system-wide for all sandboxes?
Yes. While Windows Sandbox settings are configured per session using .wsb files, you can enforce system-wide clipboard sharing behavior using Local Group Policy or the Windows Registry.
⚠️ Warning: Editing Group Policy or Registry Editor can cause system issues if done incorrectly. Always back up your registry before making changes, and proceed with caution.
Disable clipboard sharing using the Local Group Policy
- Press Win + R to open the Run Dialog box.
- Type gpedit.msc and click Enter to open the Local Group Policy Editor.
- Navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Sandbox.
- Double-click Allow clipboard sharing with Windows Sandbox.
- Set it to Disabled, then click OK.
Disable clipboard sharing using Registry Editor
- Press Win + R to open the Run Dialog box.
- Type regedit and click Enter to open the Registry Editor.
- Navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Sandbox
- Locate AllowClipboardRedirection and set its value to 0.
-
- If it doesn’t exist, create a new DWORD (32-bit) value and name it AllowClipboardRedirection, then set its value to 0.
- Restart your computer to apply changes.
⚠️ Important note: If Group Policy or Registry settings are applied, they will override .wsb configurations.
Does disabling clipboard sharing affect other Sandbox features?
No. Disabling clipboard sharing only prevents the copy-paste interactions between the host and the Sandbox. Other features remain unaffected unless separately configured.
Manage clipboard sharing with Windows Sandbox in Windows 10
Controlling clipboard redirection in Windows 10 Sandbox allows administrators to clearly define boundaries between the host system and the isolated environment. This is especially useful for scenarios that require strict isolation.
Clipboard sharing is enabled by default but can be explicitly disabled using a .wsb configuration file. This guide provides clear instructions on how to manage clipboard sharing and includes troubleshooting steps in case you encounter issues during the setup.