HTML Embed & Iframe Tester

Check and test HTML embed code safely online

Paste any <iframe> or third-party widget snippet to preview it across desktop, 768px tablet, and 375px mobile viewports inside an isolated browser sandbox—catch mixed content, fixed-width overflow, and missing attributes before pasting into production.

Full HTML Viewer & Export
Embed HTML1 iframe
Static Embed CheckRuns locally in browser
  • Hardcoded pixel width overflows mobile screens

    Fixed iframe widths (>360px) create horizontal scrolling on phones. Use the one-click Wrap Responsive button to switch to CSS aspect-ratio.

  • 1 iframe missing a title attribute

    Screen readers rely on the iframe title attribute to announce embedded videos, calendars, or widgets.

  • Add loading="lazy" to 1 iframe

    Deferring below-the-fold embeds keeps third-party frames from delaying your page's Largest Contentful Paint (LCP).

Why test embed code in a sandbox before pasting into your CMS?

Third-party embed snippets from YouTube, Loom, Calendly, Figma, Stripe, or analytics vendors often ship with hardcoded pixel widths (width="800"), missing accessibility titles, or scripts that conflict with your production styles. Testing an embed inside a logged-in CMS editor can also expose admin DOM context if your editor previews scripts on the same origin.

ViewHTML's Embed Code Tester runs your snippet inside an opaque-origin sandbox iframe (strictly omitting allow-same-origin), checks static security and responsive layout rules in real time, and lets you convert fixed-width iframes into modern CSS aspect-ratio wrappers with one click.

5 common reasons an HTML embed renders blank or broken

Quick diagnostic reference when an iframe works in one place and fails in another.

SymptomRoot causeHow to fix it
Grey box: refused to connectTarget host sends X-Frame-Options: DENY or SAMEORIGINUse the provider's official /embed/ URL or link out to a new tab
Blank box + CSP Console errorTarget sets Content-Security-Policy: frame-ancestors excluding your hostWhitelist your domain in the provider's embed settings (Vimeo, Loom, Typeform)
Blank on live HTTPS siteMixed content: iframe or script src uses http://Upgrade the embed src URL to https://
Horizontal scrollbar on mobileHardcoded pixel width attribute like width="800"Click Wrap Responsive to switch to width: 100% + CSS aspect-ratio
Buttons inside frame failRestrictive sandbox attribute missing allow-scripts or allow-formsGrant only the specific token required without pairing allow-scripts + allow-same-origin

Test any embed snippet in three steps

  1. 1

    Paste embed HTML

    Drop in an <iframe> or third-party widget snippet. Static checks highlight mixed content, fixed widths, and missing attributes automatically.

  2. 2

    Check mobile & wrap

    Toggle between Desktop, 768px, and 375px mobile views. Click Wrap Responsive to generate a clean aspect-ratio container.

  3. 3

    Copy or share preview

    Copy the fixed embed code into Webflow, WordPress, or Notion—or click Share preview to send a live link for client sign-off.

Frequently asked questions

How does this embed code tester keep third-party snippets safe?
Every embed renders inside an isolated <iframe sandbox="allow-forms allow-modals allow-popups allow-scripts"> strictly without allow-same-origin. Third-party scripts cannot read cookies, localStorage, or your logged-in session.
Why does my iframe say 'refused to connect' or render blank?
Most blank embeds are blocked by the target server sending X-Frame-Options: DENY/SAMEORIGIN or a Content-Security-Policy frame-ancestors header that excludes your site, or by mixing an http:// src inside an https:// page.
How do I make a fixed-width iframe responsive on mobile?
Click the Wrap Responsive button in the toolbar. It replaces hardcoded width/height attributes with width: 100% and modern CSS aspect-ratio (matching your iframe's original ratio), plus title, loading="lazy", and referrerpolicy.
Can I share the tested embed preview with a client or teammate?
Yes. Click Share link to create a live preview URL on an isolated *.viewhtml.app subdomain (live 3 days free with zero signup, or permanent when signed in), or open it in the full ViewHTML editor to export PNG/PDF.