Add content to your page using the Embed web part

When you add a modern page to a site, you can add and customize web parts to build your SharePoint page. This article describes the Embed web part.

You can display content on your SharePoint page from sites that allow embedding (like YouTube or Bing maps, for example). For many sites, you can either use the site's web address for the content or embed code that the site provides.

Display content using a website address

You can embed content from some websites by copying and pasting the site's web address for the content into the Embed web part .

  1. Copy the link of the embeddable content you want to use. To do this, go to the site with the content you want to embed. Somewhere near the content you will typically see a Share button or link. Click it, and copy the link address provided.

    Example of using the address of a website to embed content
  2. If you're not already in edit mode, click Edit at the top right of the page. Find the Toolbox (Toolbox icon in content pane) on the right.

  3. Select See all web parts, then select or drag-and-drop Embed </> from the list of web parts.

  4. Select Edit properties (Icon for editing web part and section properties), then paste the website address you copied earlier into the Website address or embed code box.

    Paste a video URL or Embed code into the field

Notes: 

  • Links to content only work for websites that provide a specific service for embedding content using links. If a link doesn't work for the content you want to embed, try using the embed code instead.

Display content using embed code

Embed code is a list of specific instructions from a website that describe how to display that content on another page. Many sites offer embed codes on their pages for you to copy and paste. You'll typically see a button labeled Embed code or </>. This opens a text box with some code in it.

For example, click the Share button for a video on Vimeo to see the embed code in the share dialog.

Example of using embed code to embed content on SharePoint page

To use embed code, do the following:

  1. Copy the embed code (if available) for the content you want to use. To do this, go to the site with the content you want to embed. Somewhere near the content you will typically see a Share button or link, or a button labeled Embed code or </>. This will open a text box with some code in it, similar to the image from the Vimeo site above.

  2. Find the Toolbox (Toolbox icon in content pane) on the right. Select See all web parts, then select or drag-and-drop Embed </> from the list of web parts.

  3. Select Edit properties (Icon for editing web part and section properties), then paste the embed code into the Website address or embed code box.

    Paste a video URL or Embed code into the field​​​​​​​​​​​​​​

Display dynamic content by connecting to another web part

With the Embed web part, you can enter links or embed code that use variables, allowing you to show a wide variety of items depending on what your page viewer selects. For example, you can show an image based on what a user selects from a list of Image URLs.

For information and examples, see Show a video, image, or location based on what a user selects in a List web part (connect an Embed web part to a List web part).

Example of an Embed web part connected to a list of images

Troubleshooting

Here are the most common reasons why embedding may not work:

  • Embed code must be iframe-based (that is, start and end with <iframe> tags). Embed code that uses <script> tags is not supported.

  • Only secure web sites can be embedded. Make sure the URL of the web site begins with HTTPS.

  • Not all websites allow their pages to be embedded, so you may not be able to embed them, even when they are secure and use iframe-based embed code. If you have problems, check with the website to see if they allow embedding.

  • Site collection administrators can control whether users can embed content from external websites. If they don't let contributors embed content, you may see an error message that says, “Embedding content from this website isn't allowed.” See your administrator and/or the help article Allow or restrict the ability to embed content on SharePoint pages.

Have a feature request? 

If you want to embed content from unsecured websites, or by using different embedding methods, or if you have any other suggestions or feedback, let us know.  We're listening.

Give feedback on Microsoft Office

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.