Socialinstagram.com

Can you embed Instagram in an iframe?

Yes, but only with the official embed code for a public post. Meta documents the Embed button and oEmbed for posts. Meta does not document an iframe URL for a post.

Checked Test again

Live check

What the main page sends

Result of
Post pageBlocked
www.instagram.com/p/fA9uwTtkSN
X-Frame-Options
DENY
CSP frame-ancestors
Not sent
Response
200 OK · 179 ms · HTTPS
Embed codeNot checked
www.instagram.com/p/{shortcode}

Not checked: needs your own link. Instagram has no public sample we can load.

Test your link

Steps

How to embed Instagram

  1. Open the public post in a web browser.
  2. Click…thenEmbed
  3. To remove the caption, clear Include caption.
  4. Copy the embed code. Then paste it into the HTML of your page.

Embed code

Paste this into your page

HTML
<blockquote
  class="instagram-media"
  data-instgrm-captioned
  data-instgrm-permalink="https://www.instagram.com/p/{shortcode}/">
  <a href="https://www.instagram.com/p/{shortcode}/">{post title}</a>
</blockquote>
<script async src="https://www.instagram.com/embed.js"></script>

The embed.js script renders the post in place of the blockquote. Use the full code from the Embed button when you can.

Good to know

  • Use a post link (/p/{shortcode}/) or a Reel link (/reel/{shortcode}/) in the embed code.
  • The embedded post resizes to fit its container.
  • You can embed only public photo, video, Reel and Guide posts.
  • Posts from private, inactive and age-restricted accounts do not embed.
  • Posts from accounts that turned off embeds do not embed.
  • Stories do not embed.

Sources

Profile updated

Know before you embed.

Free, no sign-up, nothing stored. Paste a URL and get a verdict, a live preview, and the fix.