To embed a Google Sheet in WordPress, open the sheet and click File > Share > Publish to web. Click the Embed tab, choose the whole spreadsheet or one sheet, click Publish, and copy the iframe code. In the WordPress block editor, add a Custom HTML block, paste the code, and update the post.
These steps cover Google Sheets in a web browser and the WordPress block editor on self-hosted WordPress.org sites and WordPress.com. They follow Google’s Make Google Docs, Sheets, Slides & Forms public help page, WordPress.com’s Embed from Google Docs guide, and WordPress.org’s Custom HTML block documentation. The Classic Editor is covered further down.
Use a Computer
- Use a computer. Publish to web is in the File menu of Google Sheets in a browser.
- Be an owner or editor of the sheet. Google says only owners and editors can publish a file.
- Check your WordPress role. On a self-hosted site, Administrators and Editors can add iframe code. Authors and Contributors can’t (see Troubleshooting). On a multisite network, only Super Admins can.
- On WordPress.com, have a paid plan. WordPress.com says embedding Google Docs files needs a Personal, Premium, Business, or Commerce plan.
- Tidy the sheet. Put the data you want to show on its own tab, with one header row of column names at the top and no stray title rows above it. If you need one, here’s how to make a header row in Google Sheets. Delete anything private, because published cells are visible to anyone who opens the page.
How to Embed a Google Sheet in WordPress
- Open the spreadsheet in Google Sheets.
- Click File > Share > Publish to web.
- Click the Embed tab.
- Choose Entire Document or a single sheet.
- Click Publish, then confirm with OK.
- Copy the HTML code in the text box.

- In WordPress, edit the post or page and add a Custom HTML block with the block inserter (+). You can also type /html in an empty paragraph and press Enter.
- Paste the code into the block. On newer WordPress versions (7.0 and later, according to WordPress.org), click Edit HTML in the empty block, paste the code into the code editor, and click Update to save it to the block.
- Click Preview to check the sheet, then click Update or Publish.

Visitors see a read-only copy of your sheet inside the post. WordPress.com notes the embed may not look right inside the editor, so use Preview in a new tab to check it. The same Publish to web window also lets you get the embed code for a Google Slides presentation.
No WordPress site? You can also build a free website with Google Sites and add a sheet from its Insert menu.
How to Check That Visitors Can See It
Open the published post in a private or incognito browser window, where you’re not signed in to Google. If the table loads there, it will load for your visitors. If you see a sign-in screen or an empty box, the sheet wasn’t published; go back to step 2.
Publishing Is Not the Same as Sharing
This is the most common mistake: setting the sheet to “Anyone with the link can view” is not the same as publishing it. If you skip Publish to web, the embed may look fine to you because you’re signed in to Google, while visitors see a sign-in screen or an empty box.
Publishing creates a separate, view-only web version of the sheet. WordPress.com’s guide also suggests setting sharing to Anyone with the link; that does no harm, but publishing is the step that makes the embed load for visitors. On a work or school account, the published version may be visible only to people in your organization, depending on your account settings, and outside visitors then see a sign-in screen. If the file is in a shared drive, a manager has to allow sharing with non-members in Shared drive settings before the file can be published.
If you want visitors to get a PDF version instead of an embedded table, you can also publish a Google Sheet to the web as a PDF from the same menu.
How to Embed a Sheet in the Classic Editor
If your site uses the Classic Editor plugin, open the post, click the Text tab (not Visual), and paste the iframe code where you want the sheet to appear, then preview the post to confirm the sheet shows. The same role rules apply: an Author or Contributor account will have the iframe removed when the post is saved.
How to Embed Just One Chart
To show a chart instead of the whole table, Google’s Save or publish your chart page gives these steps:
- Open the spreadsheet and click the chart.
- Click the three-dot More icon at the top right of the chart.
- Click Publish chart.

- Choose Embed, then click Publish.
- Copy the HTML code and paste it into a Custom HTML block in WordPress, as in the main steps.
The published chart updates when the sheet’s data changes. Keep in mind that a published chart also exposes the data behind it. If you still need to build the chart, here’s how to make a graph in Google Sheets.
How to Customize What the Embed Shows
You can show or hide parts of an embedded spreadsheet by editing settings in the iframe’s URL on your site:
- gid= the sheet ID, to show a specific tab.
- range= the rows and columns to show, such as A1:B14.
- widget= true shows the sheet tabs at the bottom.
- headers= true shows row numbers and column letters.
- chrome= true shows the title and footer.
To add them, find the web address inside the code (it ends in pubhtml) and add each setting to the end with an ampersand. For example, adding &range=A1:D20&widget=false&headers=false shows only cells A1 through D20, with no tabs and no row numbers or column letters. You’ll find a tab’s gid number in the address bar of Google Sheets when that tab is open.

To change the size, edit the width and height numbers in the iframe code. Setting the width to 100% makes the embed fill your content column, and a height of about 500 to 600 shows roughly 20 rows before visitors need to scroll inside the embed. For phones, wrap the iframe in a container set to 100% width with horizontal scrolling, so wide sheets don’t break your layout. An embedded sheet doesn’t rearrange itself for small screens, so a short range with few columns reads best on mobile.

Keeping the Embedded Sheet Up to Date
- Automatic updates: changes to the original sheet show up in the published version, though the update can take a few minutes.
- Turn off auto-updates: in Publish to web, open Published content & settings and uncheck Automatically republish when changes are made. The embed then stays as it is until you publish again, which is useful when you want to finish a batch of edits before visitors see them.
- Stop publishing: go back to Publish to web, open Published content & settings, and click Stop publishing. The embed stops working, so remove the Custom HTML block from your post as well.
To show a chart from the same sheet in a report instead of a web page, insert a Google Sheets chart into Google Docs.
Privacy: What Visitors Can See
Publishing can make a file visible to everyone on the web, depending on your account settings, so don’t publish private or sensitive data. Visitors see cell values, formatting, and charts, but people with view access can’t see or edit formulas. Before you publish, you can show formulas in Google Sheets to see which cells are calculated. If you publish a chart, the data behind it is visible too.
Publishing the entire document publishes every tab. If one tab holds private notes, choose only the tabs you want under Published content & settings, or use the range setting above.
Other Ways to Show Sheet Data in WordPress
- Link to the sheet: if you don’t need the table on the page, copy the Publish to web link from the Link tab, or share the Google Sheets file with a view-only link and add it as a normal hyperlink.
- Embed plugin: some embed plugins add a block where you paste the Publish to web link instead of iframe code. This helps if you’d rather not touch HTML.
- Table plugin: table plugins can import the sheet into a native WordPress table that visitors can sort, search, and filter. Most of them use the CSV version of the Publish to web link (choose Comma-separated values (.csv) as the format on the Link tab). Some keep the table in sync automatically, often as a paid feature.
The built-in embed is the right choice for one or two read-only tables. A plugin makes more sense when you have many sheets, need sorting or filtering, or want the table to match your theme.
On a self-hosted WordPress site, you can also add a plugin folder if you upload files to your web server with FileZilla.
When Visitors See a Blank Box
- Visitors see a blank box or a sign-in prompt: the sheet was shared but not published. Use Publish to web.
- The code disappears after you save: WordPress.org says it strips iframes from posts saved by users without the unfiltered_html permission, such as Contributors and Authors. Ask an Administrator or Editor to add the block, or have them change your role.
- The embed doesn’t work on a free WordPress.com site: WordPress.com says embedding Google Docs files needs a Personal, Premium, Business, or Commerce plan.
- Publish to web is missing: on a work or school account, your administrator may have turned off publishing.
- The embed is too small: raise the width and height values in the iframe code.
- Recent edits don’t show up: wait a few minutes, then reload the page. If they still don’t appear, open Published content & settings and check that Automatically republish when changes are made is turned on, or click Publish again.
- The sheet overlaps other content on phones: use a narrower range, set the width to 100%, and wrap the iframe in a horizontally scrolling container.
Sheets in WordPress Questions
Can visitors edit the embedded sheet?
No. Published spreadsheets appear without a toolbar, and visitors can’t edit them.
Do I need to republish after every change?
No. Automatic republishing is turned on by default for Sheets, so edits reach the embed within a few minutes. You only need to publish again if you turned that option off.
Can I embed a Google Form or Doc the same way?
Docs use the same File > Share > Publish to web > Embed steps. For a form, open it in Google Forms, click Send, choose the embed option, and copy the HTML code.
Should I use a plugin instead?
For one or two sheets, the built-in embed is enough. Table plugins can import Google Sheets data into native, searchable WordPress tables if you need sorting, filtering, or many sheets.
Will people be able to see my formulas?
No. Viewers of a published spreadsheet see values, charts, and formatting, but not formulas.
Related Guides
- How to share a Google Sheets file
- How to make a graph in Google Sheets
- How to freeze columns or rows in Google Sheets

Matthew Burleigh is the founder, head writer, and editor of Solve Your Tech, which he launched in 2012. He has written technology tutorials since 2008 and worked in IT since 2003, including small-business support, IT management, and consulting. He holds Bachelor’s and Master’s degrees in Computer Science from Arizona State University.
Matthew writes practical guides for Windows, iPhone and iPad, Microsoft Office, Outlook, Google apps, and Android. Solve Your Tech’s guides are checked step by step against the device or app maker’s own documentation and tested on his own devices whenever he has the hardware or software, with clear steps, sources, and update dates.
Read more about Matthew and how Solve Your Tech writes and updates its guides, or report a correction.