Convert a browser sandbox into a cloud sandbox
CodeSandbox provides two different sandboxing environments you can use to quickly experiment with code, learn, prototype a project and share it with others: browser sandboxes and cloud sandboxes.
Cloud sandboxes are part of our evolved CodeSandbox experience, so we now provide a way to easily convert existing browser sandboxes into this new experience.
Cloud and browser sandboxes are valuable tools for web development projects, but they have critical differences regarding their capabilities and limitations.
Browser sandboxes, also known as client-side sandboxes, run directly within the user's web browser. Because they rely on browser features to provide environments for running code, they are lightweight and easy to use. Still, they do not provide the same level of scalability and isolation as virtualized environments since they rely heavily on the browser.
In contrast, cloud sandboxes use microVMs to provide an isolated and secure environment for running code. These microVMs are lightweight and optimized for running web applications, and they provide a more consistent and predictable environment for running code than browser sandboxes.
As a result, cloud sandboxes get rid of several limitations of browser sandboxes, while offering additional benefits when managing and scaling infrastructure. Namely, cloud sandboxes can be easily scaled up or down to accommodate project needs, offering more resource allocation and management flexibility.
Additionally, cloud sandboxes are collaborative by default, allowing for easier collaboration among team members, as developers can easily share their code and collaborate in real time. This sets CodeSandbox apart from other cloud development tools.
Besides the benefits presented above, there are some other noteworthy features that are only available in cloud sandboxes:
- built-in Docker support
- support for any programming language (using Docker)
- Boxy AI assistant
- collaborative terminals with
- VS Code integration
- element inspector
However, cloud sandboxes currently do not offer feature parity to browser sandboxes. The following browser sandboxes features are currently not available in cloud sandboxes:
- deployment menu
- live sessions
There are several ways to convert a browser sandbox into a Cloud Sandbox. The first is from the URL.
Usually, browser sandboxes start with
https://codesandbox.io/s/. To convert into a cloud Sandbox, you can replace the prefix with
https://codesandbox.io/p/sandbox/. This will automatically open up a cloud sandbox.
There are a few prompts for converting a sandbox in the browser sandbox UI.
If you want to access the terminal in the browser sandbox UI, we suggest you convert it into a cloud sandbox since the experience is much better there.
In case you want to use some cloud-only features such as Docker, VS Code integration or AI, click the corresponding icon on the left sidebar. This will display a prompt allowing you to convert or fork the sandbox to get access to those features.