Click-to-Load Embed Wrapper (YouTube, Maps, Social)
Converts iframe embeds into placeholders that load the real embed only after the visitor clicks.
Use the tool
Why this tool exists
A YouTube or map embed contacts the provider as soon as the page loads, even if the visitor never plays it. A two-click solution fixes that: show a placeholder with a button, and create the iframe only when the visitor presses it.
Paste your iframe and the tool outputs the placeholder markup, small CSS and a script that builds the iframe on click, without inline event handlers. YouTube URLs can switch to youtube-nocookie.com, which still contacts Google after the click. Script-based embeds such as X posts are not handled.
How to use it
- Paste one or more iframe embeds.
- Set the placeholder text and button text.
- Copy the markup, style and script into your page.
- Mention the provider in your privacy and cookie policies.
Frequently asked questions
Does it work for Google Maps?
Yes for iframe embeds. The map loads after the click.
Is a click valid consent?
The click shows the visitor's choice for that embed. Whether it is enough depends on your setup and local rules.
What about CSP?
Allow the embed domain in frame-src.