Can You Embed a OneNote Notebook in an Iframe? Workarounds
Question details
The user wants to display a OneNote notebook or section directly on a webpage using an HTML iframe tag.

- Product
- Microsoft OneNote
- Device & OS
- not provided
- Scenario
- Attempting to embed a functional OneNote notebook into a website or intranet portal for seamless viewing.
- Observed behavior
- Direct iframe embedding is blocked by the X-Frame-Options security policy, and OneDrive embed codes only display a clickable folder or link rather than rendering the actual notebook contents.
Ensure you have the correct sharing permissions enabled for your OneNote notebook, as any workaround will require the notebook to be accessible via a public or targeted sharing link.
Use a Direct Link or Call-to-Action Button
Since native iframe embedding is blocked by Microsoft's security policies, the recommended workaround is to create a styled button on your webpage that directs users to the online notebook.
Microsoft implements strict X-Frame-Options policies to prevent clickjacking. This means you cannot force the OneNote web app to load inside a frame on an external domain.
Instead of an iframe, creating a visual embed-style button provides a clean user experience while bypassing the iframe restriction entirely.
Open your notebook in OneNote or OneDrive, click the 'Share' button in the top right corner, and select 'Copy Link' to generate a view-only or editable web link.
In your website's HTML source code, create a button element or an anchor tag styled to look like a button (e.g., using CSS classes like 'btn' or 'button').
Paste the copied OneNote sharing link into the 'href' attribute of your anchor tag, and add target='_blank' so the notebook opens seamlessly in a new browser tab.

Need a More Flexible Office Suite? Try WPS Office
While OneNote restricts iframe embedding due to Microsoft's strict policies, exploring other lightweight office tools can improve your workflow. WPS Office is a highly compatible, free alternative that makes managing and sharing documents, spreadsheets, and presentations completely hassle-free.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install the application: Run the installer and follow the on-screen instructions to set up WPS Office on your device.
- 3. Open and share files: Launch WPS Office, open your documents, and use the built-in sharing tools to generate web-friendly links.

Frequently Asked Questions
Why does OneNote block iframe embedding?
Microsoft utilizes the X-Frame-Options security header to prevent clickjacking attacks. This strict policy stops the OneNote web interface from being rendered inside an iframe on third-party domains.
Can I embed a OneDrive folder containing the notebook instead?
Yes, you can generate an HTML embed code from OneDrive for the specific folder containing your notebook. However, this will only display a generic folder icon or text link inside the iframe, not the rendered contents of the notebook pages.
Are there any third-party tools that can force an embed?
No official or secure third-party tool can bypass Microsoft's server-side X-Frame-Options policy. Attempting to strip these headers using proxy servers is a security risk and is strongly discouraged.




