iFrame embed code generator

Responsive embed code for pages and videos, with a live preview.

Read aloud by screen readers. Describe what's inside.
Size
Let the embedded page use
Security

Embed code


            
            
          

Live preview

Blank preview? That site doesn't allow being embedded.

How to use it

  1. Paste the address of the page or video. YouTube, Vimeo, Loom and Spotify links are converted to their embed address automatically.
  2. Give it a short title — screen readers announce it, so describe what's inside (for example, “Product demo video”).
  3. Choose Responsive to fill the width of your page at a fixed shape, or Fixed size for exact pixels.
  4. Copy the code and paste it into your page's HTML, or into the “custom HTML” block of your site builder.

Questions

Why is the preview blank?

Many sites (most banks, social networks and search engines) send a header that forbids being shown inside another page. The browser obeys it and shows nothing. If the site offers an official “Embed” option, use the address it gives you.

How do I make an iframe responsive?

Give it width:100% and an aspect-ratio, with height:auto. That's what the Responsive option writes, and it works in every current browser without wrapper divs.

What does sandbox do?

It locks the embedded page down: no scripts, forms, pop-ups or cookies unless you allow each one. Use it for content you don't fully trust.

Should I use loading="lazy"?

Yes for anything below the first screen. The frame only loads when someone scrolls near it, which makes your page faster.