How to Get the Embed Code for a Google Slides Presentation

To get the embed code for a Google Slides presentation, open it on a computer and click File > Share > Publish to web. Click the Embed tab, choose a size and how quickly the slides advance, then click Publish. Copy the HTML code that appears in the box and paste it into your website or blog.

Getting the code also publishes the presentation, which can make it visible to people who do not have access to the file. Read the section on what publishing does before you click Publish on anything private. The steps below follow Google’s Make Google Docs, Sheets, Slides & Forms public help page.

Use a Computer

  • A computer. Google’s help pages for Android, iPhone, and iPad say to publish or embed from a computer. The mobile apps are not listed as an option.
  • Owner or editor access. File owners and editors can publish a file. If you can only view or comment, ask the owner to publish it or to give you edit access.
  • Permission from your organization. On a work or school account, an administrator can turn publishing off.
  • A place to paste HTML. The embed code is HTML, so your website, blog, or learning platform needs an editor that accepts it.

An embed code is a short piece of HTML that displays content from one website inside a page on another. The code from Google Slides is an iframe, which is an HTML element that shows one web page inside a frame on another page.

How to Get the Embed Code for Google Slides

  1. Open the presentation in Google Slides in a web browser on your computer.
  2. Click File at the top of the window, point to Share, and click Publish to web. A small window opens with two tabs, Link and Embed.
  3. Click the Embed tab. The Link tab is selected by default and only gives you a web address, not code.
  4. Choose a presentation size and how quickly the slides should advance. See the options section below if you are not sure what to pick.
Google Slides Publish to web window on the Embed tab with size, auto-advance and checkbox options
Choose a size and auto-advance timing on the Embed tab, then click Publish.
  1. Click Publish. If Google asks you to confirm, click OK. This is the point where the presentation becomes available outside the file’s normal sharing settings.
  2. Copy the HTML in the text box. Click inside the box, select all of the code, and press Ctrl + C (Command + C on a Mac).

You now have the complete embed code on your clipboard. It starts with <iframe and ends with </iframe>. If either end is missing after you paste it, copy it again.

Some of Google’s own help pages still describe the older path, File > Publish to the web. If you do not see a Share submenu, look for Publish to the web directly in the File menu.

Illustration of the steps to get the embed code for a Google Slides presentation
Illustration: the steps to get the embed code for a Google Slides presentation.

Embed Options and What They Do

Google’s help page says that for a presentation you choose a size and how quickly to change the slides. The other labels below are how the Publish to web window is commonly described, so the wording on your screen may differ slightly.

OptionWhat it controlsGood starting point
Slide sizeThe width and height of the player written into the codeMedium fits most blog content areas
Auto-advance slidesHow long each slide stays on screen before the next one appearsLong enough to read your busiest slide
Start slideshow as soon as the player loadsWhether the slides begin playing without a clickOff, if visitors should move through the slides themselves
Restart the slideshow after the last slideWhether the slideshow loops back to the first slideOn for a display that runs unattended

These choices are saved in the code itself, not in the presentation. To change the timing later, you need to copy a new link or code. Open Publish to web again, change the settings on the Embed tab, copy the new code, and replace the old code on your site.

Link Tab or Embed Tab?

The Link tab gives you a URL to send to people. It opens the slideshow on its own page. The Embed tab gives you HTML that places the slideshow inside a page you control. Use the link for email or chat, and the embed code for a website or blog. To send a reviewer to one piece of feedback instead of the whole slideshow, you can create a link to a comment in Google Slides.

Comparison of the Link tab and the Embed tab in the Google Slides Publish to web window
Illustration: how the Link tab and the Embed tab differ in the Publish to web window.

What Publishing Does to Your Presentation

Illustration of what to know before embedding Google Slides
Illustration: what to know before embedding Google Slides.
  • Who can see it: depending on your account’s settings, a published file can be visible to everyone on the web, everyone in your organization, or a group of people in your organization. Do not publish slides that contain private or sensitive information.
  • What viewers get: a version they cannot edit. For presentations, that means a view-only version or a version in presentation mode with full-screen slides.
  • Edits go live: any change you make to the original presentation is updated in the published version. The update might take a few minutes.
  • No pause button: Docs and Sheets let you turn off automatic republishing, but you can’t turn off automatic updates in Google Slides. To keep a fixed version on your site, publish a copy of the file and edit the original.
  • Sharing is separate: publishing does not change who you have shared the file with, and removing collaborators does not unpublish it.

How to Add the Code to Your Website

Where you paste the code depends on what your site runs on. The general rule is that it must go into an HTML or code field, not a normal text field.

  • WordPress block editor: add a Custom HTML block where you want the slides, paste the code, then preview the post. The same block works for embedding Google Sheets in WordPress.
  • Google Sites: you do not need the code. Open the site, click Insert, choose Slides, pick the file, and click Insert. Google also suggests publishing the presentation first and adding its published link through Insert > Embed, so every visitor can see it. The details are on Google’s Add Google files, videos, website content, & more page.
  • Other site builders and learning platforms: look for a block or button named HTML, Embed, Code, or an icon that looks like </>.

If the page shows the code as plain text instead of a slideshow, it was pasted into a text field. Delete it and paste it into an HTML block or the editor’s code view.

Google Docs doesn’t accept embed codes, so to share a clip in a document, add the video to Google Docs as a link instead.

How to Check That the Embed Works

  1. Save or preview the page that contains the code.
  2. Open that page in a private or incognito browser window, where you are not signed in to Google. This shows what a visitor sees.
  3. Confirm that the slides load and that the arrows in the player move between slides.
  4. Open the page on a phone. The code has a fixed width and height, so a large player can run off the side of a narrow screen. If it does, go back to the Embed tab, pick a smaller size, and copy the new code.

How to Stop Publishing

Stopping removes the published version from the web, so every page that uses your embed code stops showing the slides. This is the way to remove a file from the web.

  1. Open the presentation in Google Slides on a computer.
  2. Click File > Share > Publish to web.
  3. Click Published content & settings at the bottom of the window.
  4. Click Stop publishing, and confirm if asked.

Remove the leftover code from your pages afterward, since it will no longer display the presentation. You can publish again later by repeating the steps for getting the code. Check the embed after you republish, and copy the new code if the old one no longer loads.

When the Embed Code Is Missing

Checklist of things to check when a Google Slides embed code is missing or not working
Illustration: what to check when the embed code is missing or the embed stops working.
  • Publish to web is missing or you can’t publish: on a work or school account, your administrator might have turned off the ability to publish a file. Contact your administrator. Also check that you are on a computer and that you have edit access.
  • The file is in a shared drive: open Shared drive settings from the arrow next to the shared drive’s name, click Edit next to Sharing with non-members, allow non-members to be given access to files, and click Apply. Then publish the file. You may need a manager of the shared drive to change this.
  • Visitors are asked to sign in or see nothing: on a work or school account the published version may be limited to people in your organization. Your administrator controls that setting.
  • The embed shows old slides: wait a few minutes and reload the page. Updates are automatic but not instant.
  • An editor published a file you own: to prevent that, click Share, open Settings, and uncheck Editors can change permissions and share.
  • The embed went blank on every page: someone probably clicked Stop publishing. Open Publish to web and publish again.

Once the slides are on your site, these guides cover other ways to show or hand out the same presentation:

Google’s Present slides page has more on auto-advancing slides in a published presentation.

Slides Embed Questions

Can I get the Google Slides embed code on a phone or tablet?

Not from the Google Slides app. Google’s Android and iPhone and iPad instructions say that to publish or embed a presentation, you should go to Google Drive on a computer.

Is publishing to the web the same as sharing a link?

No. Sharing gives specific people, or anyone with the link, access to the actual file with a role such as Viewer or Editor. Publishing creates a separate version that people can only watch, and it is what the embed code points to.

Can I embed just one slide?

The embed code covers the whole presentation, and Google’s help page does not list an option to publish selected slides. The simple route is to make a copy of the file, delete the slides you do not want in the copy, and publish the copy.

Can I change the player by editing the code?

You can change the width and height numbers in the code to resize the player, which is ordinary HTML. The code’s web address also carries your timing and start choices. URL settings like these are documented for embedded spreadsheets but not for presentations, so the safer way to change them is to pick new options on the Embed tab and copy fresh code. Unofficial tweaks, such as hiding the control bar, are not documented by Google and could stop working.

Will viewers see my speaker notes or be able to edit?

Viewers cannot edit a published presentation. What they see is a view-only or presentation-mode version of the slides, according to Google. Its help page does not say whether speaker notes are included, so remove anything from the notes that you would not want made public.

Does the embedded presentation update when I edit my slides?

Yes. Changes to the original presentation appear in the published version automatically, usually after a few minutes. You do not need to copy the code again unless you change the size or timing options.