In the context of computer security, a sandbox provides a tightly-controlled environment in which semi-trusted programs or scripts can be safely run in memory (or with limited access to the local hard disk).

The sandbox concept can be implemented in a web browser, to safeguard someone from potentially harmful content, or it can be implemented in an anti-malware program as a method for analyzing programs in order to determine if they are safe or harmful.