How to Embed a Social Media Post on Your Website
Every platform publishes embed code and most hide it. Here is where each one keeps it, when to use an iframe instead of a script, and what to do about consent.

Where each platform hides its social media post embed code
| Platform | Where it lives |
|---|---|
| X | The post's "…" menu, visible only when signed in |
| Removed from the web UI; the permalink form still works | |
| TikTok | Three taps into the share sheet |
| The post menu, or the Embed Post plugin page | |
| No button at all — the embed path takes an activity URN | |
| The Pin's "…" menu, on desktop only | |
| The share menu, under "Embed" | |
| YouTube | Share → Embed |
linkedin.com/embed/feed/update/urn:li:activity:<id>, and the ID is buried in the post's own URL after activity-. Nothing in the interface tells you this.Script or iframe
- your CMS strips
<script>tags on save, which many rich-text editors do; - the page is AMP, which forbids arbitrary script outright;
- a privacy review has to sign the page off.
widgets.js. Ten copies of the script tag is ten downloads of the same file.The five-minute version
- Open the post in a browser and copy its URL from the address bar, not from the share
- Get the embed code, either from the platform's own menu or from a generator.
- Paste it into a raw HTML block, not a rich-text one.
- Move the
<script>tag to the bottom of the page and delete the duplicates. - Add a plain link to the post immediately after the embed.
- Load the page with JavaScript disabled and check that step five is visible.
Keep the plain link underneath
<div> degrades into nothing, and the reader cannot tell whether they missed something or you did.What an embed costs the page
youtube-nocookie.com domain, and knows which parameters still do anything. Instagram has its own quirks, covered in how to get an Instagram embed code.Why does my X embed render as plain text?
<a> inside the blockquote, not from the blockquote itself, and many editors tidy an empty anchor out of existence on save. Paste the code into a raw HTML block rather than a rich-text one.Can I embed a private or deleted post?
Do embedded posts help my SEO?
Does embedding a post count as attribution?
Put it to work
Tools for the job you just read about
Free to run, most of them without an account.
Social Media Embed Code Generator
Official embed code for a post from any platform, from its URL alone.
Google SERP Snippet Preview
See your title and description as a Google result — on a desktop and a phone.
Social Media URL Cleaner
Strip the tracking off a link — and see what each parameter was telling somebody.
Instagram Money Calculator
What to charge for a post — priced the way a brand actually prices it.
Username Availability Checker
One handle, checked against every network’s rules at once.
YouTube Metadata Viewer
Every field a YouTube video declares about itself, in one table.
Keep reading
More from the blog

How to Get an Instagram Embed Code
Instagram removed the embed button from the web interface, but the embed itself still works. Here is how to build the code from a post URL, in both forms.

How to Shorten a YouTube Link
YouTube has its own short domain, youtu.be. Here is how to build one from any link shape, and why copying the timestamp across usually breaks it.

How to Get the RSS Feed for a YouTube Channel
Every YouTube channel and playlist publishes an RSS feed. Here is the URL format, how to find the ID it needs, and what the feed does and does not include.