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.

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

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.

Related guides