Embed a PDF on your website with one line of code
Drop a PDF, create a free account, and copy an iframe code that works in any page that accepts HTML. The PDF opens in a viewer that works on phones.
Next, create a free account so your link keeps working. No credit card.
How to embed a PDF on a website
You only sign up once. After that, every PDF you upload has its own embed code.
- 1
Drop your PDF
Choose a PDF, or a Word or PowerPoint file that we convert to PDF for you.
- 2
Create a free account
Your file uploads as soon as you reach the dashboard, and the embed code opens when it is ready.
- 3
Paste the code
Copy the iframe code and paste it into an HTML or embed block on your site. Any site builder that accepts HTML works.
What the embed code looks like
One iframe. The width fills its container and the height is 700 pixels, which you can change to suit your page.
<iframe src="https://sharepdf.link/s/menu-a1b2c3.pdf/embed" title="menu.pdf on SharePDF" width="100%" height="700"></iframe>Example only. Your code uses your own PDF’s link.
SharePDF embed vs linking the PDF file
You can also point an iframe straight at a PDF file you host. Here is what changes.
Swipe sideways to compare
Browsers, especially on phones, handle PDF files in frames in different ways. Test on a phone either way.
Embedding questions
Short answers about embedding a PDF with SharePDF.
Is embedding a PDF free?
Yes. The embed code is on every plan, including the free plan, which keeps 2 PDFs live at a time with files up to 5 MB.
Where do I find the embed code later?
In your dashboard, open the PDF’s menu and choose Embed, or use the Embed button on the PDF’s own page. Both open the same code with a Copy code button.
Can I change the PDF without changing the embed code?
Yes. Replace the file and every page that embeds it shows the new version. The replacement must be a PDF, and the old file is deleted.
Can visitors download the embedded PDF?
Only if you allow it. Unlisted PDFs start with downloads off unless you change your defaults. Visitors can still take screenshots or copy text, so it is not DRM.
Do embedded views count in analytics?
Yes. Opens inside the embed count as views like any other. Paid plans add countries, referrers, devices and time on each page.
Will search engines index the embedded PDF?
The embedded viewer asks search engines not to index it, so the page that embeds it gets the attention, not a separate copy of the PDF.
Does it work with a password or email form?
Yes, on paid plans. The embed shows the password or email form first, then the PDF. Private PDFs do not open in an embed.
Related tools and guides
Other ways to put the same PDF in front of people.
PDF to link
Turn a PDF into a link that opens in any browser.
How to embed a PDF in HTML
iframe, object and embed tags, with code you can copy.
Replace a PDF without changing the link
Update the embedded PDF without touching your site.
PDF download control
Keep the embedded PDF view-only.
PDF analytics
See views, and on paid plans, time on each page.
Put your PDF on your website
Create a free account, upload the PDF, and copy the embed code.