Facebook Post & Video Embed Generator

Paste a link to a public Facebook post or video and get a free embed code that shows it on your website — no sign-up needed.
The full link from the post’s ⋯ menu or the address bar, e.g. https://www.facebook.com/yourpage/posts/…Need your page’s whole feed, not one post?
Facebook’s script sizes the embed to the post. A plain iframe has a fixed height: use it where the site builder doesn’t run scripts. Videos and reels always get an iframe.

Embed the post

<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v23.0"></script>
<div style="max-width:500px;margin:0 auto;">
  <div class="fb-post" data-href="https://www.facebook.com/beamtrace/posts/pfbid0MRFe6y6u1TFFDHQkzdCXBpNLdPQodaVXkVSPscVRXVzwUzu6Rv6f6FBaEQnDGFXxl" data-width="500" data-show-text="true"></div>
</div>
<p style="margin:4px auto 0;max-width:500px;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/facebook-embed-generator/" target="_blank" rel="noopener" style="color:inherit;text-decoration:none;">Elfsight</a></p>

Works only for public posts — set the audience to Public.

  1. Click Copy code above to copy it.
  2. Open the page’s HTML file or template.
  3. Paste the code inside <body>, where the content should appear.
  4. Save and upload the page, then open it in a browser to check.

Need your Facebook page’s posts on your site, not just one? Use a feed widget. See Facebook Feed →

Before you go

Need your Facebook page’s posts on your site, not just one? Use a feed widget.

See Facebook Feed →
Or share this free tool:
Facebook Feed widget

Show your Facebook page, not one post

Fresh posts and updates make your website feel active, social and alive. Everything you add to your Facebook page appears on your website automatically.
  • Posts, photos and videos from your Facebook page

  • Updates by itself when you post

  • Visitors follow your page with one click

Why use this instead of the Facebook Embed button

Facebook’s Embed option lives in each post’s menu, and its documented manual setup needs the Facebook JavaScript SDK on your page. The generator makes the code from the link you already have: Facebook’s own code that fits the post, or a plain iframe for site builders that don’t run scripts.
Facebook’s Embed button
This generator
Where you start
Open the post on a computer, open its menu, choose Embed
Paste a post, video or Reel link
Script on your page
The documented manual code needs the Facebook JavaScript SDK
Facebook’s script, which sizes the embed to the post, or a plain iframe with no script
Post text
Set in the code (data-show-text)
Show or hide the post text with one switch
Width
Set in the code
Pick a width; the code stays within Facebook’s limits
Short fb.watch links
—
Asks you for the full link, so the code points to the right video
Public posts only
The Embed option appears only when the audience is Public
Reminds you that only public posts and videos work

Where you start

Facebook’s Embed button

Open the post on a computer, open its menu, choose Embed

This generator

Paste a post, video or Reel link

Script on your page

Facebook’s Embed button

The documented manual code needs the Facebook JavaScript SDK

This generator

Facebook’s script, which sizes the embed to the post, or a plain iframe with no script

Post text

Facebook’s Embed button

Set in the code (data-show-text)

This generator

Show or hide the post text with one switch

Width

Facebook’s Embed button

Set in the code

This generator

Pick a width; the code stays within Facebook’s limits

Short fb.watch links

Facebook’s Embed button

—

This generator

Asks you for the full link, so the code points to the right video

Public posts only

Facebook’s Embed button

The Embed option appears only when the audience is Public

This generator

Reminds you that only public posts and videos work

Facebook embed options reference

Facebook documents these settings for its Embedded Posts and Embedded Video Player plugins. In Facebook’s script code they are data- attributes (data-show-text); in the iframe code they go into the post.php or video.php address.
Option
What it does
Values
Notes
href
The post or video to show
The full URL of the post or video
Must be public. Copy it from the address bar or by right-clicking the post’s date.
width
Width of the embed
Posts: 350 to 750 pixels. Videos: at least 220 pixels
Leave empty for a fluid post width. Don’t set the size with CSS: Facebook says it can cause display errors. On mobile, embeds scale to the container.
show_text
Shows the text of the post
true, false
Default false. For posts it applies to photo posts. For videos it works on desktop only.
allowfullscreen
Lets visitors play the video full screen
true, false
Videos only. Default false.
autoplay
Starts the video when the page loads, muted
true, false
Videos only. Not applied on mobile. Default false.
show_captions
Shows video captions by default, if the video has them
true, false
Videos only, desktop only. Default false.
lazy
Lets the browser skip loading the embed until it’s near the screen
true, false
Same as loading="lazy" on an iframe. Default false.

href

What it does

The post or video to show

Values

The full URL of the post or video

Notes

Must be public. Copy it from the address bar or by right-clicking the post’s date.

width

What it does

Width of the embed

Values

Posts: 350 to 750 pixels. Videos: at least 220 pixels

Notes

Leave empty for a fluid post width. Don’t set the size with CSS: Facebook says it can cause display errors. On mobile, embeds scale to the container.

show_text

What it does

Shows the text of the post

Values

true, false

Notes

Default false. For posts it applies to photo posts. For videos it works on desktop only.

allowfullscreen

What it does

Lets visitors play the video full screen

Values

true, false

Notes

Videos only. Default false.

autoplay

What it does

Starts the video when the page loads, muted

Values

true, false

Notes

Videos only. Not applied on mobile. Default false.

show_captions

What it does

Shows video captions by default, if the video has them

Values

true, false

Notes

Videos only, desktop only. Default false.

lazy

What it does

Lets the browser skip loading the embed until it’s near the screen

Values

true, false

Notes

Same as loading="lazy" on an iframe. Default false.

Facebook docs ↗

Why the Facebook post doesn’t show

The post isn’t public

Only public posts from Pages and profiles can be embedded. A public post has a gray globe icon next to its date. To make your own post public, click the audience icon next to the date and choose Public.

The embed is empty or shows a “not available” message

The post was deleted or its audience changed from Public, so Facebook shows a message in its place. Make the post public again or embed another one.

The link points to a page or profile, not a post

Use the post’s own link: open the post and copy the address bar, or right-click the post’s date and copy the link.

You pasted a short fb.watch link

Open the link, then copy the full facebook.com address of the video from the address bar.

The code broke after pasting it into WordPress

WordPress can turn the & characters in the code into #038;, which breaks the embed. Paste the code into a block that keeps HTML unchanged.

The embed looks cut off or stretched

Don’t resize it with CSS. Set the width in the code instead: 350–750 pixels for posts, at least 220 for videos.

How to embed a Facebook post

  1. Copy the link

    On Facebook, open the post or video and copy its link.

  2. Paste it here

    Paste the link, set the width and choose whether to show the text.

  3. Add the code

    Paste the code into an HTML block on your page.

Frequently asked questions

More Embed Code Generators

iFrame Generator

Build a responsive iframe for any page, form or app.iFrame Generator