How to Embed a Google Form in WordPress
Quick answer: In your Google Form, click Send, choose the embed icon, and copy the iframe code. In WordPress, add a Custom HTML block in the editor and paste the code in directly. If the form doesn't appear after saving, your WordPress setup may be stripping iframes — a plugin that allows raw HTML embeds fixes that.
Embedding a Google Form directly into a WordPress page or post keeps visitors on your site instead of sending them off to a separate forms.google.com link. The mechanics are simple — it's the same iframe embed code Google gives you for any website — but WordPress has a couple of quirks worth knowing about before you paste it in. This guide covers the WordPress-specific steps; for the general embedding process across any platform, see our guide on embedding a Google Form on a website.
If you'd rather describe the form than build it, the FormMaker AI form generator writes the questions and creates the Google Form in your account for you.
Step 1: get the embed code from Google Forms
Open the form you want to embed and click Send in the top-right corner. In the Send dialog, click the embed icon — it looks like < > — next to the link and email icons. Google generates an iframe tag, and you can adjust the default width and height right in that dialog before copying it. Click Copy to grab the full HTML snippet.
Step 2: add a Custom HTML block in WordPress
Open the page or post where you want the form to appear, in the WordPress block editor. Click the + to add a new block, search for Custom HTML, and select it. Paste the iframe code you copied from Google Forms directly into that block — no need to modify it unless you want to adjust the size. Use the block's Preview tab (next to the HTML tab, inside the block) to check it renders before you save the page.
When the iframe gets stripped: fixing a form that won't show
On some WordPress configurations, the form simply doesn't appear after you save or publish, even though you pasted the code correctly. This usually happens because a security plugin or a hardened hosting setup filters out raw iframe tags from post content, since iframes can be a security risk if left unchecked from untrusted sources. If this happens to you, the fix is generally to find a simple, well-reviewed WordPress plugin whose specific job is allowing iframe or shortcode-based embeds through the content filter — search the WordPress plugin directory for "iframe" or "embed" plugins and check reviews and update recency before installing one, since we haven't tested or endorsed a specific plugin here. Alternatively, check whether your existing security plugin has a setting to allow specific HTML tags like iframe.
Step 3: fix a scrollbar cutting off your form
Google's default embed height is often too short for anything beyond a handful of questions, which means respondents get an internal scrollbar squeezed into a small box rather than seeing the whole form. Open the Custom HTML block, find the height="…" attribute in the iframe tag, and increase the number — for a longer form, don't be afraid to set it well above the default, since extra blank space at the bottom is far less annoying to a visitor than a cramped scrolling window. There's no exact formula; the right height depends on how many questions you have, so adjust and preview until the whole form is visible without its own scrollbar.
Mobile responsiveness varies by theme
An embedded Google Form is itself responsive, but how it sits inside your WordPress theme's layout is theme-dependent — some themes constrain embedded iframes nicely within their content width, while others let a fixed-width iframe overflow the page on a phone screen. Because this varies so much by theme and page builder, don't just trust the desktop preview: open the published page on an actual phone and scroll through the embedded form before considering the job done.
When to just link instead of embed
Embedding is great when you want the form to feel like part of the page, but it isn't always necessary. If you just need visitors to fill out a form and don't care about keeping them on your WordPress site, a plain link is simpler, has zero iframe-stripping risk, and opens the form in Google's own mobile-optimized layout instead of inside your theme's constraints. See our guide on sharing a Google Form for the different link and QR code options.
Quick checklist
- Copy the iframe code from Send > Embed in your Google Form.
- Use a Custom HTML block, not the regular paragraph or embed blocks, in the WordPress editor.
- If the form disappears after saving, look for a plugin that allows iframe embeds, or check your security plugin's HTML filtering settings.
- Increase the height value if a scrollbar is cutting off the bottom of the form.
- Always test on an actual phone before considering the embed finished — theme behavior varies too much to trust a desktop preview alone.
Why iframes get stripped: the user-role cause most people miss
Before installing anything, check who is saving the page. On a standard single-site WordPress install, only Administrators and Editors have the unfiltered_html capability, which is what lets raw HTML such as an iframe survive the save. If an Author or Contributor pastes the Google Forms embed code, WordPress sanitizes the content and the iframe can quietly disappear. On a Multisite network the rule is stricter: generally only Super Admins keep unfiltered HTML, so even a site-level Administrator may see the embed removed.
That gives you a simple diagnostic order:
- Check the role of the account that saved the page. Ask an Administrator or Editor to open the page, paste the embed code into the Custom HTML block again, and update. If it sticks, the problem was the role, not a plugin.
- Check security or hardening plugins. Some include an option that disables unfiltered HTML for everyone, or filter specific tags. Look in the plugin's settings for HTML, iframe, or "unfiltered HTML" options.
- Check your host. Some managed hosts and hosted WordPress plans restrict raw HTML or plugins on lower tiers. If you are on WordPress.com, check its support pages for which plans allow iframes and custom code, since this has changed over time.
- Only then consider a plugin whose job is allowing embeds, as described above.
Avoid "fixing" this by giving every author on your site the Administrator role. Unfiltered HTML is restricted for a reason: anyone with it can add scripts to pages. For a team blog, it is safer to have one Editor publish the page that holds the form.
Embedding with the Classic Editor, Elementor, and other page builders
Not every WordPress site uses the block editor. The embed code is the same everywhere; only the place you paste it changes.
| Editor or builder | Where to paste the iframe | Watch out for |
|---|---|---|
| Block editor (Gutenberg) | Custom HTML block | Pasting into a Paragraph block shows the code as text instead of a form |
| Classic Editor | The Text tab (not Visual) | Switching back to Visual and saving can sometimes alter the markup; finish in the Text tab |
| Elementor | The HTML widget | Set the column width so the form is not squeezed into a narrow sidebar column |
| Divi and similar builders | A code or HTML module | Builder-level padding can add extra space around the iframe |
| Widgets area / sidebar | A Custom HTML widget | Sidebars are narrow; long forms usually work better on a full-width page |
Page builders change their menus fairly often, so if a widget name above does not match what you see, search the builder's element list for "HTML" or "code." The principle is always the same: use an element that outputs raw HTML, not one that escapes it into text.
Making the embedded form responsive
Google's embed code ships with a fixed pixel width, typically 640. On a phone that can be wider than the screen. The cleanest fix is to change the width attribute so the iframe fills its container instead. In the Custom HTML block, edit the iframe so it reads width="100%" rather than a fixed number, and leave the height as a pixel value large enough to show the whole form.
A worked example (illustrative): a contact form with five short questions might look right at a height of around 900 pixels on desktop. On a phone, the same questions wrap onto more lines, so the form gets taller. If you set the height for desktop only, mobile visitors will see an inner scrollbar. Preview on a phone, then raise the height until the Submit button is visible without scrolling inside the iframe. Some extra white space below the form on desktop is the normal trade-off.
If your theme lets you add custom CSS (Appearance > Customize > Additional CSS on many themes, or the Site Editor's styles on block themes), you can add a small rule such as iframe[src*="docs.google.com/forms"] { max-width: 100%; } so every embedded Google Form stays inside the content column. That is a site-wide rule, so test a couple of pages after adding it.
Form settings that affect an embedded form
Some Google Forms settings behave differently once the form lives inside your site:
- Sign-in requirements. If the form is restricted to your organization, limited to one response per person, or includes a file upload question, respondents must be signed in to a Google account. Inside an iframe, the sign-in step can be clumsy, and some browsers that block third-party cookies may not show the signed-in state. For public website forms, keep sign-in requirements off where you can, or link to the form instead of embedding it. See file upload questions in Google Forms for why uploads always require sign-in.
- Collecting email addresses. In Settings > Responses > Collect email addresses, the "Verified" option requires sign-in, while "Responder input" just adds an email field. For a website contact form, "Responder input" is usually the smoother choice.
- Confirmation message. After submitting, the confirmation text appears inside the iframe. Write a clear one, for example "Thanks, we reply within two business days," in Settings > Presentation > Confirmation message. Our guide on custom confirmation messages has examples.
- Accepting responses. If you turn off Accepting responses in the Responses tab, the embedded form shows the closed message right on your page. That is useful for seasonal forms, but remember to remove or update the page when the form will stay closed.
Getting notified when someone submits from your site
An embedded form feeds the same Responses tab as the original link, so nothing special is needed to collect data. What site owners usually want is a heads-up. In the form's Responses tab, open the three-dot menu and choose Get email notifications for new responses. For a running log, click Link to Sheets so each submission becomes a row in Google Sheets. The guides on response notification emails and linking Google Forms to Sheets cover the details, including how to get notified about specific answers with add-ons or Apps Script.
Spam on embedded website forms
A public form on a public page will eventually attract bot submissions. Google Forms has no built-in CAPTCHA you can switch on, so the practical defenses are form-side:
- Add response validation to fields such as email or phone so random strings are rejected.
- Make key questions required, and include one simple question a bot is unlikely to answer correctly, then filter in Sheets.
- If spam is heavy, switch the page to a link plus a short description, or use sign-in requirements for internal forms.
The full set of options is in our guide to stopping spam responses in Google Forms.
Performance, caching, and lazy loading
An embedded Google Form loads from Google's servers, not your host, so it does not add to your database load. Recent WordPress versions add loading="lazy" to iframes automatically in many cases, which means the form loads as the visitor scrolls near it. That helps page speed, but if your form sits at the very top of a page, a performance or caching plugin that also lazy-loads iframes can occasionally delay it. If the form appears late or not at all for logged-out visitors, temporarily disable iframe lazy loading in your optimization plugin and clear its cache to test. Also clear the page cache after editing the embed code; otherwise visitors may see the old version.
Use cases: what WordPress site owners embed
- Small businesses: quote requests, appointment requests, and simple order forms on a services page.
- Teachers and schools: a class website with a permission-slip form, volunteer sign-ups, or a parent survey embedded on the relevant page.
- Nonprofits: volunteer applications and event registrations, with responses flowing into a shared Sheet the team already uses.
- HR and internal sites: an intranet built on WordPress with request forms. Here, restricting the form to your Google Workspace organization often makes sense, but test the sign-in behavior inside the iframe first.
Accessibility notes
Google Forms renders standard form controls, so screen readers can generally work through an embedded form. Two things are on you. First, give the iframe a descriptive title attribute (for example title="Contact form") if your embed code lacks a meaningful one, so assistive technology announces what the frame contains. Second, add a short line of text above the embed that says what the form is for and offers a direct link to open it in a new tab. That link helps people who use zoom, keyboard-only navigation, or older devices where nested scrolling is awkward. Our guide on Google Forms accessibility covers question wording and image alt text.
Common mistakes
- Copying the share link instead of the embed code. A plain
forms.glelink pasted into WordPress may become a clickable link or an auto-embed attempt, not the full form. Use the< >embed tab. - Embedding the editor URL. The URL ending in
/editis your private editor. Visitors without access will see a permission error. Always copy from the Send dialog. - Editing the form and re-embedding. You do not need to. Changes you make in Google Forms appear in the embedded version automatically because the iframe points to the live form.
- Forgetting the closed state. If you stop accepting responses, the page still shows the form's closed message. Update the page copy so visitors know what to do instead.
Building the form before you embed it
If the WordPress side is ready but the form itself is not, start from a structure that already works. The FormMaker template library has contact, feedback, registration, and order forms, and the AI form generator drafts questions from a description. Either way, the result is a regular Google Form in your own account, so you embed it with exactly the steps on this page.
FAQ
How do I get the embed code for a Google Form?
Open your form, click Send, choose the embed (< >) icon, adjust the width and height if you like, then click Copy to copy the iframe HTML code.
Which WordPress block should I use to embed a Google Form?
Use the Custom HTML block in the block editor. Add a new block, search for "Custom HTML," and paste the iframe code Google gave you directly into it.
Why doesn't my Google Form show up after I pasted the embed code in WordPress?
Some WordPress configurations and security plugins strip raw iframe tags from content for safety reasons. If your form disappears after saving, look for a simple, well-reviewed plugin that explicitly allows iframes or shortcode embeds, and check your security plugin's settings for an HTML filtering option.
Why is there a scrollbar cutting off my embedded form?
The iframe's default height is often too short for longer forms. Increase the height value in the embed code until the whole form fits without its own internal scrollbar.
Why does the iframe disappear only when some team members save the page?
On a standard WordPress site only Administrators and Editors can save unfiltered HTML. When an Author or Contributor saves, WordPress can strip the iframe. Have an Editor or Administrator paste the embed code and publish the page.
Do I need to update the WordPress page when I edit the Google Form?
No. The embed points to the live form, so question changes appear automatically. You only need to change the WordPress page if you want a different height or the form is closed.
How do I make an embedded Google Form fit on phones?
Change the iframe's width attribute to 100% and set a pixel height tall enough for the form on a phone, then check the published page on a real device and adjust.
Can I embed a Google Form that requires sign-in?
You can, but sign-in inside an iframe can be awkward and some browsers block the cookies it relies on. For forms with file uploads, organization-only access, or one response per person, consider linking to the form instead.