How to Embed a Google Form on Your Website

Quick answer: Open your form, click Send, then click the < > embed icon to copy the iframe HTML. Paste that code into a Custom HTML or Code block on your website. Adjust the width and height values in the code so the form isn't cropped, especially if it's long.

Sending visitors off-site to fill out a form loses some of them along the way. Embedding a Google Form directly into your page keeps people in context — useful for contact forms, event sign-ups, feedback widgets, or anything you want to feel like part of your site rather than a detour. Google builds the embed code in for free; here's how to use it well.

Getting the built-in embed code

  1. Open your form and click Send in the top-right corner.
  2. In the dialog, click the < > icon (embed HTML).
  3. Google generates an iframe snippet that looks like this:

<iframe src="https://docs.google.com/forms/d/e/FORM_ID/viewform?embedded=true" width="640" height="921" frameborder="0" marginheight="0" marginwidth="0">Loading…</iframe>

  1. Click Copy, then paste that snippet wherever your site accepts raw HTML.

Adjusting width and height

The default dimensions Google generates are a reasonable guess, but rarely exact. Edit the two numbers directly in the code:

Embedding on WordPress

Add a Custom HTML block (in the block editor) or a Text widget in HTML mode (classic editor), and paste the iframe code directly in. WordPress renders it as-is — no plugin required, though form plugins that "import" Google Forms are unnecessary for a simple embed like this.

Embedding on Squarespace

Add a Code Block to the page (from the block menu when editing a page), paste the iframe HTML, and save. Squarespace's code blocks accept raw embeds like this without restriction, but check the block's width setting against your page's grid so the form doesn't overflow its column.

Embedding on Wix

Wix requires using its Embed > Embed a Widget (or "HTML iframe") element from the Add panel, then pasting the code into the settings panel that opens. Unlike WordPress and Squarespace, Wix renders embedded HTML inside its own iframe wrapper, so you may need to nudge the element's size on the canvas in addition to editing the code's height value.

Embedding in a plain HTML page

If you're hand-coding a page, paste the iframe snippet directly into the body wherever you want the form to appear — no special handling needed. It's a good idea to wrap it in a container div with a max-width so the form doesn't stretch edge-to-edge on wide screens.

Common issues

  1. The form is cut off at the bottom. This is almost always a height problem — see the adjustment note above. Increase the height value until the full form, including the submit button and any "required" errors that might appear, fits without an inner scrollbar.
  2. The embedded form doesn't look responsive on mobile. A fixed pixel width doesn't shrink for small screens. Set width="100%" in the iframe and let a CSS max-width on the parent element control the upper bound, so it scales down naturally on phones.
  3. The form loads blank or shows a "refused to connect" error. First check the src URL: it should end in /viewform?embedded=true. Pasting the editor URL (ending in /edit) into an iframe is refused by Google. If the URL is right, the cause is usually the page it's embedded on is served over a network or CMS proxy that blocks third-party iframes. Check your site's Content-Security-Policy settings if you manage them directly, since a restrictive frame-src rule can silently block Google's domain.
  4. The form flashes "Loading…" and never finishes. Confirm the form's sharing setting allows anyone with the link to view it — if it's restricted to specific people or your organization only, an embedded iframe on a public page will fail to load for outside visitors the same way a direct link would.
  5. Styling looks inconsistent with the rest of the page. Google Forms renders its own fonts and colors inside the iframe and does not inherit your site's CSS — there's no supported way to restyle the form's internal appearance from outside the iframe, only the container around it.

Embedding and page load performance

An embedded Google Form loads its own iframe content separately from the rest of your page, which adds an extra network request and a small delay before the form itself appears — usually not enough to notice, but worth knowing if you're auditing page speed. If the form sits below the fold, consider lazy-loading the iframe (adding loading="lazy" to the iframe tag) so it doesn't compete for bandwidth with content visitors see immediately. This is a native HTML attribute supported by all modern browsers and requires no extra script.

Accessibility considerations

Because the form content lives inside Google's own iframe, its accessibility — screen reader labels, keyboard navigation, focus order — is determined by Google Forms itself rather than anything you control on your page. The one thing you can improve from your side is adding a descriptive title attribute to the iframe tag (for example, title="Event registration form"), which screen readers announce before entering the embedded content. For a broader look at how accessible Google Forms is out of the box, see our guide on Google Forms accessibility.

Embedding vs. just linking out

Embedding keeps visitors on your page, matches your site's surrounding design, and can reduce the drop-off that happens when someone gets redirected to an unfamiliar domain. It's the better choice for short forms placed on a dedicated page — like a contact form or a quick feedback widget.

Linking out is simpler to set up (no height-tuning needed), gives the form its full, unconstrained layout, and avoids the scrolling-inside-a-box feeling that long or multi-section forms can create in a cramped iframe. If your form is long, has file uploads, or uses grid questions, linking to it directly — see our guide on sharing a Google Form — is usually the more comfortable experience for respondents.

Embedding for a contact form

Embedding is especially popular for turning a Google Form into a free contact form on a business or portfolio site — no backend, no email server setup, and responses land straight in a Google Sheet you can check anytime. If that's your goal specifically, our dedicated guide on using Google Forms as a contact form for your website covers field choices and spam-reduction settings worth adding on top of the basic embed.

Before you embed: publish and sharing checks

An embed only shows what a visitor could see by opening the form link directly, so get the form itself ready first.

  1. Make sure the form is accepting responses. Recent versions of Google Forms have a Publish button in the editor; an unpublished form, or one where Accepting responses is switched off in the Responses tab, shows a "no longer accepting responses" message inside your page. Interface wording has changed over time, so if your editor looks different, Google's Forms help center has the current steps.
  2. Check who can respond. In a Google Workspace account (school or business), forms can be limited to people in your organization. That setting is fine for an intranet page but breaks a public website embed.
  3. Decide on sign-in requirements. Settings such as Limit to 1 response and any File upload question require respondents to sign in to a Google account. Inside an iframe, that sign-in step can be blocked or confusing because many browsers restrict third-party cookies. If your form needs sign-in, test it in a private window, and consider linking out instead.
  4. Write a confirmation message. The thank-you screen appears inside the iframe, so keep it short and include any next step. See our confirmation message guide.

A responsive embed you can copy

The default snippet uses fixed pixel sizes. This pattern makes the form fill your content column on any screen while capping its width on desktops:

<div style="max-width:720px;margin:0 auto;">
  <iframe
    src="https://docs.google.com/forms/d/e/FORM_ID/viewform?embedded=true"
    title="Contact form"
    width="100%" height="1200"
    style="border:0;"
    loading="lazy">Loading…</iframe>
</div>

What each change does:

Height is still fixed. Because the form lives on Google's domain, your page's scripts cannot read its content height, so true auto-resizing is not available for a standard Google Forms embed. Fill out the form yourself on a phone, including triggering a few "This is a required question" errors, and set the height so the submit button is visible without an inner scrollbar. On a multi-section form, check the longest page, not the first one.

More platforms

PlatformWhere to paste the codeNotes
Google SitesInsert → Forms, then pick the form from your DriveNo code needed. You can also use Insert → Embed → Embed code to control height.
WebflowAdd an Embed (code embed) elementCustom code features can depend on your Webflow plan; check Webflow's help pages.
ShopifyIn the theme editor, a Custom Liquid section, or the HTML view of a page's content editorTheme options vary; test on the live storefront, not only in the editor preview.
NotionType /embed and paste the form's normal link (not the iframe code)Resize the block by dragging its edges.
Wix, Squarespace, WordPressSee the sections aboveWordPress has its own walkthrough: embedding a Google Form in WordPress.

Whatever the platform, paste the iframe code from the Send dialog, not the address bar URL of the editor. The address bar URL ends in /edit and will not load in an iframe.

Pre-filling fields in an embedded form

You can pre-fill answers in an embed the same way you do in a link. In the form editor's three-dot menu, choose Get pre-filled link, fill in the fields you want, and click Get link. The copied URL contains parameters like entry.123456=Spring+Open+House. Add those parameters to the iframe's src after embedded=true, joined with &:

.../viewform?embedded=true&entry.123456=Spring+Open+House

This is handy when the same form is embedded on several pages: each page can pre-select its event, product or location, so you can tell in the sheet which page a response came from. Our pre-filled link guide explains how the entry IDs work.

Tracking and privacy

Worked example: an event page for a small nonprofit

Illustrative scenario: a community group runs a volunteer day and wants sign-ups on its own site.

  1. They build a short form: name, email (with email validation), shift (multiple choice), and T-shirt size (dropdown). Long or optional questions are left out, because every extra question adds height to the iframe.
  2. They get the embed code from Send → < >, then swap in width="100%", add a title and set the height after testing on a phone.
  3. They paste it into a Custom HTML block on the event page, above a short paragraph with the date, address and a contact email for anyone who cannot use the form.
  4. When a shift fills up, they edit the multiple choice options in the form. The embed updates automatically, because the iframe always loads the live form. Their event registration pattern handles the rest.

The last point is worth stressing: you never need to re-copy the embed code after editing questions. You only need to revisit it if the form gets longer and the height no longer fits.

Testing checklist before you go live

If you are still building the form itself, FormMaker's templates give you a ready Google Form to customize before you embed it.

FAQ

Why is my embedded Google Form cut off?

The default embed code uses a fixed height, which can be shorter than your actual form. Increase the height attribute value in the iframe tag, or set it generously higher than the form's content so nothing is clipped.

Is it better to embed a Google Form or just link to it?

Embedding keeps visitors on your site and matches your page layout, which can improve completion rates. Linking out opens the full, unconstrained form experience and is simpler to set up. For short forms on a dedicated page, embedding usually works better; for long or complex forms, linking out avoids cramped scrolling inside an iframe.

Can I embed a Google Form on WordPress or Squarespace?

Yes. Paste the iframe embed code into a Custom HTML block in WordPress, or a Code Block in Squarespace and Wix. All three platforms support raw HTML embeds for this purpose.

Why does my embedded Google Form show a blank box or refuse to connect?

This is usually caused by a restrictive Content-Security-Policy on your site blocking third-party iframes, or by the form's sharing settings being restricted to specific people rather than anyone with the link. Confirm the form is shared with "Anyone with the link" and check any frame-src restrictions your site or CMS may enforce.

Does an embedded Google Form update when I edit the form?

Yes. The iframe loads the live form every time, so question changes appear immediately. Only revisit the embed code if the form gets longer and needs a taller height value.

Can an embedded Google Form resize its height automatically?

No. Your page cannot read the height of content on Google's domain, so a standard embed uses a fixed height. Test the longest page of the form on a phone and set the height to fit.

Can I pre-fill answers in an embedded Google Form?

Yes. Use Get pre-filled link in the editor's three-dot menu, then add the entry parameters to the iframe src after embedded=true, joined with an ampersand.

Related guides