Instagram Embed Code Generator
<div style="max-width:540px;margin:0 auto;"> <blockquote class="instagram-media" data-instgrm-permalink="https://www.instagram.com/p/DdmURC4iIv8/" data-instgrm-version="14" style="max-width:540px;min-width:326px;width:calc(100% - 2px);margin:0 auto;background:#fff;border:1px solid #dbdbdb;border-radius:3px;padding:0;"> <a href="https://www.instagram.com/p/DdmURC4iIv8/" target="_blank" rel="noopener">View this post on Instagram</a> </blockquote> </div> <script async src="https://www.instagram.com/embed.js"></script> <p style="margin:4px auto 0;max-width:540px;text-align:center;font:11px/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;color:#a3a7b0;">Created with <a href="https://elfsight.com/tools/instagram-embed-code-generator/" target="_blank" rel="noopener" style="color:inherit;text-decoration:none;">Elfsight</a></p>
Works only for posts from public accounts.
- Click Copy code above to copy it.
- Open the page’s HTML file or template.
- Paste the code inside
<body>, where the content should appear. - Save and upload the page, then open it in a browser to check.
Need your whole Instagram feed, not one post? Show it with a widget that updates by itself. See Instagram Feed →
Show your Instagram feed, not one post
Posts from usernames, hashtags or locations
A familiar Instagram look
Website visitors become followers

Why use this instead of the Instagram Embed button
/p/, /reel/, /reels/ and /tv/ links; igsh and other tracking parameters are removedembed.js scriptWhere you start
Instagram’s Embed button
This generator
Link formats
Instagram’s Embed button
This generator
/p/, /reel/, /reels/ and /tv/ links; igsh and other tracking parameters are removedCheck before you copy
Instagram’s Embed button
This generator
Caption
Instagram’s Embed button
This generator
Code type
Instagram’s Embed button
embed.js scriptThis generator
Layout
Instagram’s Embed button
This generator
Instagram embed options reference
<blockquote class="instagram-media"> that Instagram’s embed.js turns into the rendered post. These are the attributes and request options that change it.data-instgrm-permalinkhttps://www.instagram.com/p/{shortcode}/ or /reel/{shortcode}/data-instgrm-captioneddata-instgrm-versionembed.js<script async src="//www.instagram.com/embed.js"></script>instgrm.Embeds.process().maxwidth320 to 658 pixelshidecaptiontrue, falsefalse.omitscriptembed.js script tag (oEmbed API request)true, falseembed.js once yourself.data-instgrm-permalink
What it does
Values
https://www.instagram.com/p/{shortcode}/ or /reel/{shortcode}/Notes
data-instgrm-captioned
What it does
Values
Notes
data-instgrm-version
What it does
Values
Notes
embed.js
What it does
Values
<script async src="//www.instagram.com/embed.js"></script>Notes
instgrm.Embeds.process().maxwidth
What it does
Values
320 to 658 pixelsNotes
hidecaption
What it does
Values
true, falseNotes
false.omitscript
What it does
embed.js script tag (oEmbed API request)Values
true, falseNotes
embed.js once yourself.Why the Instagram post doesn’t show
The account is private
Posts from private accounts can’t be embedded. The owner has to make the account public, or pick a post from a public account.
The owner turned off embeds
Accounts that disabled Embeds aren’t supported. The owner can turn embeds back on in their Instagram settings.
The account is age-restricted or inactive
Instagram doesn’t render posts from these accounts. Choose a post from another account.
It’s a Story
Stories can’t be embedded. Share the content as a post or a Reel and embed that link.
You see a plain box with a link instead of the post
embed.js didn’t run. Keep the script tag in the code, and if posts are added after the page loads, call instgrm.Embeds.process(). Or use the iframe version, which needs no script.
The code sits inside a Shadow DOM
Instagram doesn’t support Shadow DOM. Place the code in the regular page HTML.
Reels, posts and Stories: what can be embedded
instagram.com/p/{shortcode}/instagram.com/reel/{shortcode}/Post (photo, carousel, video)
Can it be embedded?
Link to paste
instagram.com/p/{shortcode}/Notes
Reel
Can it be embedded?
Link to paste
instagram.com/reel/{shortcode}/Notes
Story
Can it be embedded?
Link to paste
Notes
How to embed an Instagram post
Copy the post link
Open the post or reel on Instagram and copy its link.
Paste it here
Paste the link above and choose whether to show the caption.
Copy the code
Copy the embed code and paste it into an HTML or code block on your site.