How to Embed a PDF on Your Website

Upload the file, then display it with an iframe or object tag pointing at the PDF's address, sized to roughly 100% wide and 600 to 800 pixels tall. Always add a plain download link too, because many phone browsers will not render a PDF inside the page and show a blank box instead.

Three HTML ways to show a PDF
TagFallback contentGood for
<iframe src>No (shows nothing if unsupported)Simplest, widest support on desktop
<object data>Yes (text inside the tag)Showing a download link when the viewer fails
<embed src>NoLegacy pages; avoid for new work

Updated

Browsers on desktop have built-in PDF viewers, so pointing a frame at a PDF usually just works. The catch is mobile, accessibility and search: an embedded PDF is harder to read on a phone, harder for screen readers, and its text is not part of your page. Use an embed for menus, brochures and forms people need to print, and a real web page for anything you want found.

Embed a PDF on We.Inc, WordPress, Wix, Squarespace or plain HTML

We.Inc

  1. Host the PDF somewhere with a public link, for example Google Drive set to 'anyone with the link'.
  2. In the AI chat, say which page and section should show it, for example 'embed this PDF menu under the Menu heading with a download link', and paste the link.
  3. Check the preview on desktop and switch to the phone view.
  4. Publish once it looks right.

PDF embeds are not an add-on; the AI writes the embed into your page code, which uses credits on a paid plan.

WordPress

  1. In the block editor, add a File block.
  2. Upload the PDF or pick it from the Media Library.
  3. In the block settings sidebar, turn on Show inline embed under PDF settings.
  4. Set the height in pixels and keep the download button switched on.
  5. Update or Publish the page.

WordPress.com notes that most phone and tablet browsers will not display the inline embed, which is why the download button matters.

Wix

  1. In the Editor, open the App Market, search for PDF Viewer and click Add to Site.
  2. Click the app on the page, then Upload PDF and Add File.
  3. Choose the file from the Media Manager or upload it, then click Add to Page.
  4. Copy the widget to other pages if you need to show different PDFs.

Squarespace

  1. Add a button block or a text link on the page.
  2. In the link editor, choose File from the dropdown and upload the PDF.
  3. Optionally add an image block showing the cover with a clickthrough to the file.
  4. To show it inline, add a Code block containing an iframe that points at the uploaded file's address.

Squarespace has no native PDF viewer block. Code blocks with iframes need the Core, Plus or Advanced plan, and each uploaded file must be 20 MB or smaller.

Plain HTML

  1. Upload menu.pdf to your site, for example into /files/.
  2. Paste the object example below where the PDF should appear.
  3. Keep the link inside the object so browsers without a viewer show it instead.
  4. Set the height in CSS rather than a fixed width so it fits phones.

HTML that degrades to a link

object with a built-in fallback

If the browser has no inline viewer, the paragraph inside the object appears in place of the document, so phone visitors still get the file.

<object data="/files/menu.pdf#view=FitH" type="application/pdf" width="100%" height="700">
  <p>Your browser cannot show this PDF. <a href="/files/menu.pdf">Download the menu (PDF, 1.2 MB)</a>.</p>
</object>

Sources

Checked October 28, 2026: the PDF embed pages we read.

  • WordPress File block and its Show inline embed option: https://wordpress.org/documentation/article/file-block/
  • WordPress.com note on PDFs and mobile browsers: https://wordpress.com/support/embedding-a-pdf-file/
  • Wix Editor document uploads and the PDF Viewer app: https://support.wix.com/en/article/wix-editor-uploading-documents-pdf-doc-xls-etc
  • Squarespace file uploads and the 20 MB limit: https://support.squarespace.com/hc/en-us/articles/205813928-Uploading-and-managing-files
  • Squarespace plans that allow iframes in code blocks: https://support.squarespace.com/hc/en-us/articles/206543167-Code-blocks

When an embed is the wrong tool

Restaurant menus are the classic example. A PDF menu forces zooming on phones, and its dishes are invisible to anyone searching 'vegan ramen near me'. A short HTML menu with a PDF download for printing serves both.

Public bodies have extra duties here. Accessibility rules in many countries expect web content to be usable with assistive technology, and our guide on accessible PDF alternatives covers what to publish instead.

How it works

  1. Shrink the PDF first (export at screen quality) so it opens quickly.
  2. Upload it to your site's file storage and copy its address.
  3. Place an iframe or object element pointing at that address.
  4. Add a visible 'Download the PDF' link next to it.
  5. Test on an actual phone, not just a narrow desktop window.

Tips

  • Add #page=3 to the end of the PDF address to open on page 3, and #view=FitH to fit the width. Chrome and Firefox honour these; some viewers ignore them.
  • Give the iframe a title attribute such as 'Spring menu (PDF)' so screen readers announce what it is.
  • Squarespace limits uploaded files to 20 MB each, so compress large brochures before uploading.
  • If the information matters for search, also publish it as HTML. Google can index PDFs, but they rank poorly next to proper pages and give visitors no navigation.

Frequently asked questions

Why does my embedded PDF not show on iPhone or Android?

Many mobile browsers do not render PDFs inside a frame. They show an empty box or an 'open' button. That is why a download link beside the embed matters.

Can I embed a PDF from Google Drive?

Yes. Set sharing to anyone with the link, copy the file's link, change the ending from /view to /preview, and use that address as the iframe source. The file then loads in Google's viewer.

Can visitors fill in a PDF form embedded on my site?

Sometimes, in desktop browsers with good PDF support, but submissions are not sent anywhere. Squarespace notes that form functions in PDFs do not work once uploaded. Build an HTML form instead.

Is it better to link to a PDF or embed it?

Link when the document is long or meant for printing. Embed when people need a quick look without leaving the page, such as a one-page menu or price sheet.

Related: HTML iframes and video, Accessible PDF alternatives, HTML embed code generator, HTML to PDF, Markdown to PDF.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

Product

Who It's For

Features

Resources

Company

View Sitemap