Skip to content
Free tool

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.

Drop your PDF hereDrag files here, or browse · up to 5MBPDFDOCXPPTX

Next, create a free account so your link keeps working. No credit card.

Free planNo credit cardNo viewer sign-up
How it works

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. 1

    Drop your PDF

    Choose a PDF, or a Word or PowerPoint file that we convert to PDF for you.

  2. 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. 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.

The code

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.

Compared

SharePDF embed vs linking the PDF file

You can also point an iframe straight at a PDF file you host. Here is what changes.

What you getiframe to a PDF fileSharePDF embed
ViewerWhatever the browser doesThe same viewer everywhere
Download buttonUsually shownYour choice
View countsNot includedIncluded
Swap the file, keep the codeIf you overwrite the fileIncluded
HostingYour serverSharePDF

Swipe sideways to compare

Browsers, especially on phones, handle PDF files in frames in different ways. Test on a phone either way.

FAQ

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.

Put your PDF on your website

Create a free account, upload the PDF, and copy the embed code.