Embed a Microsoft Form in a shared HTML page
A survey page, event page or report with a Microsoft Forms survey on it. What embed=true changes, why a small frame shows only a link, what a wrong form ID shows, and how to share the page as a link.
Ask Claude or ChatGPT for a survey page "with a Microsoft Form" and it adds an <iframe> pointing at forms.office.com. Microsoft allows its forms inside other sites, so it works in a shared page.
The tests below were run in headless Chrome against a public Microsoft Forms survey, on a page served over http and on the same file opened from disk.
Get the embed code
In Microsoft Forms, open the form, choose Collect responses (or Share), then the embed option, and copy the code. The iframe address is forms.office.com/Pages/ResponsePage.aspx?id=... with &embed=true at the end.
Tested: forms.office.com addresses redirect to forms.cloud.microsoft, and the form loaded inside the frame either way. The plain response address without embed=true and the short forms.office.com/r/... link also loaded inside a frame. With embed=true the form used smaller text and margins to fit the frame.
Give the frame a height
Microsoft's embed code sets 640 by 480 pixels. Tested: the survey inside was about 1,200 pixels tall and scrolled inside the 480-pixel frame; the Next button at the bottom was reachable by scrolling. Raise the height in the iframe tag to show more of the form at once.
Tested: an iframe with no width or height showed a 300 by 150 pixel box with only the Microsoft Forms logo and a "Fill out the form" link, not the questions.
Use your form address
The id= value comes from your own form and is long, often over 80 characters. AI tools sometimes shorten it or fill in a placeholder.
Tested: an address with an ID that does not exist showed Microsoft's "This form doesn't exist" page inside the frame, so a wrong ID is visible rather than a blank box.
Opening the file from your computer
Tested: the same page opened from disk (a file:/// address) loaded the form the same way as over http.
Upload it and send the link
Drag the HTML file onto the FileShare Pro dashboard and copy the link. Viewers need no account on FileShare Pro. The shared view does not restrict frames or scripts inside your page, so the form loads there as it did in the test. Responses go to your Microsoft Forms results, not to FileShare Pro.
Edit the form in Microsoft Forms and the embedded form shows the new version on the next load; the page and the link stay the same. To collect replies without a form service, see a feedback form with no backend. Related: a Google Form in a shared page, an Airtable form in a shared page and a Jotform in a shared page.
Frequently asked
Not for a form set so anyone can respond. The test form loaded and showed its questions with no sign-in. A form limited to people in your organization asks them to sign in.
No. The password protects the page. The form address is in the page source and the form works on its own at its Microsoft address: password-protecting an HTML page.
No. Shared files carry a noindex header: keeping a preview out of Google.
Drop the file, copy the link — live in seconds, free plan included.
Start sharing free