Free tool · Marketing · No sign-up

Social Media Embed Code Generator

Paste the share link from Instagram, YouTube, Facebook, X, TikTok, Pinterest, LinkedIn, Threads or Spotify. Get copy-ready embed HTML — responsive, lazy-loaded, and script-free wherever the platform allows it.

Paste a link

Instagram, YouTube, Facebook, X, TikTok, Pinterest, LinkedIn, Threads and Spotify.

Embed code

Paste a link on the left. You'll get copy-ready HTML — an iframe where the platform offers one (works in any website builder, no script), or the platform's official embed where it doesn't.

What this embed code generator does

Every social platform publishes its own way to show a post on another website: YouTube and Spotify have an iframe player, Instagram and Facebook have an iframe plugin plus a script version, X, TikTok, Pinterest and Threads rely on a script. Remembering which is which — and the exact attributes each one wants — is the annoying part. This tool recognises the link, picks the right method and writes the markup. Where both exist you get the iframe by default, because it works in builders that strip scripts and loads only when scrolled into view.

<iframe src="https://www.youtube-nocookie.com/embed/VIDEO_ID" loading="lazy" allowfullscreen></iframe>

How to use it

  1. Copy the link

    Open the post in the app, tap Share → Copy link. On desktop, copy the address bar.

  2. Paste it

    The tool tells you what it recognised — for example “Instagram reel”.

  3. Pick options

    Responsive or fixed size, start time and privacy mode for YouTube, caption for Instagram and Facebook, dark theme for X and Spotify.

  4. Copy and paste

    Press Copy code and paste it into your website's HTML block, custom code section or email tool. Press Preview first to see it rendered.

Worked example: a reel on a product page

A jewellery seller has a 20-second reel of a necklace catching the light and wants it on the product page of her website. She copies the reel link (instagram.com/reel/…), pastes it here and leaves the size on Responsive. The generator returns an iframe pointing at instagram.com/reel/…/embed/captioned/ inside a 9:16 box capped at 540px wide, with lazy loading. She pastes it into the page's HTML block; on a phone it fills the width, on desktop it sits at 540px, and it does not load until the visitor scrolls down to it.

When to use which

  • Portfolio or business site — embed the two or three posts that prove the work; link the rest. Each embed is a network request.
  • Product pages — a reel of the product in use converts better than a fourth photo. On SitesPlaced it is a field, not code.
  • Blog posts — an X post or LinkedIn post as a quote keeps the author's attribution intact.
  • Newsletters — most email tools don't run iframes or scripts. Use a screenshot that links to the post instead.
  • Anything from a private account — it won't embed. Ask the author to make the post public or share a screenshot with permission.

For getting the posts themselves seen, read the best ways to promote an Instagram store.

Frequently asked questions

Which platforms does the embed code generator support?

Instagram posts and reels, YouTube videos and Shorts, Facebook posts, videos and Pages, X (Twitter) posts and profile timelines, TikTok videos, Pinterest pins, LinkedIn posts, Threads posts and Spotify tracks, albums, playlists, episodes and shows. Profile links on platforms that don't offer a profile embed become a plain 'Follow' link.

Iframe or the official script embed — which should I use?

Use the iframe wherever the tool offers one. It is a single HTML tag, works in every website builder and email tool that allows HTML, and loads nothing until the visitor scrolls to it. The official script embeds (Instagram's embed.js, X's widgets.js, TikTok's embed.js, Pinterest's pinit.js) look slightly more native but need a script tag, which many editors strip out. If your builder removes scripts, the iframe is the one that works.

Why does my Instagram or Facebook embed show a blank box?

Three usual causes: the post is from a private account or has friends-only privacy (only public posts embed), the account has switched off embedding in its settings, or the site editor stripped the script tag from an official embed — switch to the iframe version. Instagram also blocks embeds inside some in-app browsers; test in a normal browser.

Do embeds slow my website down?

They can: an Instagram or Facebook embed pulls a few hundred kilobytes of JavaScript from that platform. The generator adds loading="lazy" so the embed only loads when it scrolls into view, and the YouTube option uses the privacy-enhanced youtube-nocookie.com domain, which sets no cookies until play. For a page with many videos, embed one or two and link the rest.

Is it legal to embed someone else's post?

Embedding shows the post from the platform's own servers with the author's name and a link back, which is how the platforms intend their embed features to be used. It is not the same as downloading and re-uploading the content. If the author makes the post private or deletes it, the embed disappears too.

Can I embed an Instagram reel on my SitesPlaced store without code?

Yes. Every product on a SitesPlaced store has an 'Instagram reel URL' field — paste the reel link and it plays on the product page next to the photos, no embed code needed. For any other page, Design → Add Section → Text Block accepts links, and the Ecommerce plan's custom head code takes any embed script.

Put this to work on a free online store

The reels you post already sell for you — a store puts a Buy button under them. On a free SitesPlaced store every product has an Instagram reel field, so the video plays on the product page with the price and an Add to cart beside it. No code, no embed script.

Open your free store

₹0 to publish, unlimited products, 0% commission. Razorpay, COD, WhatsApp checkout, Shiprocket and Shipmozo included free. ₹499/month (early-bird; ₹999 after the first 50 stores) adds a custom domain, branding removal, AI copy, analytics, Meta Pixel + CAPI and WhatsApp Business API alerts. See pricing.

More free tools

All the free tools are listed on the free tools hub.