What is Iframe Sandbox & Allow Attribute Generator?
The sandbox attribute restricts what an iframe can do, and the allow attribute grants specific feature permissions such as fullscreen, camera, or payment. Together they create a security boundary around embedded content. This tool generates the right sandbox and allow values for common embed types so you do not accidentally allow more permissions than the embed needs.
Quick answer
Use the sandbox attribute on iframes to restrict what the embedded content can do -- such as submitting forms, opening popups, or running scripts. Add allow values one at a time and only as needed.
Limitations
- The sandbox attribute does not protect against clickjacking on the parent page. Use a Content-Security-Policy with frame-ancestors for that.
- Some iframe features, such as storage access and top-level navigation, behave differently across browsers when sandbox is applied.
- Removing sandbox does not retroactively expose APIs -- the iframe must be reloaded for sandbox changes to take effect.
How to use this tool
- Select the embed type that best matches what you are embedding.
- Review the suggested sandbox flags and allow permissions. Adjust them for your specific use case.
- Enter the iframe source URL and a descriptive title.
- Copy the generated iframe tag into your HTML page.
What you can use it for
- Embed a YouTube video with minimal sandbox permissions.
- Add a payment iframe with only the payment permission allowed.
- Restrict a third-party form embed to only the permissions it needs.