Responsive iframe Embed Code Builder (aspect-ratio, lazy, sandbox)
Generates iframe embed code that scales with its container and includes the attributes that matter for accessibility, privacy and safety.
Use the tool
Why this tool exists
Embed codes from video sites use fixed widths and often omit a title. This builder produces an iframe that scales to its container using CSS aspect-ratio (with an older padding fallback if you pick it), a required title for screen readers, lazy loading, a referrer policy and an optional sandbox.
Sandbox presets are starting points: a sandbox that blocks scripts will break most video players, so test the embed. Prefer privacy-friendly embed domains where the provider offers them.
How to use it
- Paste the embed URL.
- Write a title that describes the content.
- Choose ratio, loading, sandbox and referrer options.
- Copy the markup.
Frequently asked questions
Why is a title required?
Screen readers announce the frame by its title.
What does sandbox do?
It restricts what the framed page can do. Add back only what the embed needs.
Why aspect-ratio?
It keeps the shape as the width changes without extra wrapper elements.