Online Tool Store Online Tool Store

Embed Code Generator

Paste a YouTube, Vimeo, TikTok, or other link to auto-generate a responsive iframe, fixed iframe, or script embed with live preview, free and browser-only.

🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.

Step 1 · Input

URL to embed

Live

Detected platform:  waiting for a URL

Options

Runs entirely in your browser — nothing here is sent to a server.

Step 2 · Preview

Live preview

Enter a valid URL above to see a live preview here.

Some sites block being embedded (via X-Frame-Options or a CSP frame-ancestors policy). If the preview stays blank, the generated code is still correct — that target simply can't be framed on any site, not just this preview.

Step 3 · Generated code

Paste this into your page

Supported platforms

Automatically detected and optimized

Paste a normal link from any of these and the tool rewrites it to that platform's embed URL. Any other valid http(s) URL falls back to a generic iframe. Select one to load an example.

How Embed Code Generator works

  1. Paste a normal link — YouTube, Vimeo, Loom, TikTok, Spotify, SoundCloud, X, or any other page.
  2. The tool detects the platform and converts it to the right embed URL.
  3. Pick Responsive iframe, Fixed iframe, or Script embed, then adjust sizing, alignment, loading behavior, and permissions — the code and live preview update as you type.
  4. Copy the result with one click.

FAQ

Does it validate the URL I enter?

Yes. The URL must be a well-formed http:// or https:// address before any code is generated — invalid entries show an inline error instead of producing broken markup.

Which platforms does it auto-detect?

Paste a normal link from YouTube, Vimeo, Loom, TikTok, Spotify, SoundCloud, or X (Twitter) and the tool rewrites it to that platform’s embed URL automatically, showing a "Detected platform" indicator next to the field. Google Maps links are recognized but need Google’s own Share → Embed URL. Any other valid http(s) URL falls back to a generic iframe.

What is the difference between the three embed types?

Responsive iframe wraps the frame in a container that keeps your chosen width-to-height ratio as the page resizes. Fixed iframe uses an exact pixel width and height. Script embed outputs a single <script> tag for providers that embed via JavaScript rather than an iframe.

Is the generated HTML safe to paste as-is?

Yes. The URL and title are HTML-escaped before being inserted into the snippet, so quotes or angle brackets in your input can't break out of the generated attributes.

Why is the preview sometimes blank?

Many sites send an X-Frame-Options or Content-Security-Policy header that blocks being loaded in any iframe, including this preview. That's a restriction set by the target site, not a problem with the generated code.

Will the generated code work on WordPress, Wix, or Squarespace?

Yes. The output is plain HTML (an iframe or a script tag), so it works anywhere you can paste custom HTML — a WordPress custom HTML block, a Wix embed element, a Squarespace code block, or a hand-written page.

Is the tool free to use?

Yes. It runs entirely in your browser with no sign-up, no watermark, and no limit on how many embed codes you generate.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.