Get the HTML to show a PDF inside your web page: responsive size, opening page and zoom, toolbar on or off, and a download link for phones. Plain code, no sign-up.
Upload the PDF to your own website (or share it publicly from Google Drive or Dropbox) and paste its address. Nothing is uploaded here.
Preview
The frame will show here, at its real size.
The preview shows the frame at its real size and the PDF’s first pages. On your site, each visitor’s browser shows the PDF with its own viewer, so the toolbar looks a little different in Chrome, Edge, Firefox and Safari.
The code is made in your browser. Nothing is uploaded or hosted.
Which code to use
Frame (iframe): works in every browser and site builder. The recommended choice.
Object: shows a message with a download link where the browser can’t display PDFs.
Download link only: just a link, when you would rather not show the PDF in the page.
Give it a title, so the browser shows a proper name and screen readers announce it.
To set how the PDF opens in readers that follow it (page, layout, panel), use PDF Initial View.
Use the https:// address: browsers block http:// files inside https:// pages.
Open parameters
The options are added after # in the address: page=3 opens page 3, zoom=150 or zoom=page-width sets the zoom, toolbar=0 hides the toolbar and navpanes=0 closes the side panel. Chrome, Edge and Firefox follow most of them; Safari shows the PDF its own way.
Frequently asked questions
How do I embed a PDF in a website?
+
Upload the PDF to your website (or share it publicly from Google Drive or Dropbox), paste its address here, choose the size and options, and copy the HTML. Paste it into your page, for example in a WordPress “Custom HTML” block. The PDF stays on your own site.
Can I open the embedded PDF at a certain page or zoom?
+
Yes. Choose Open at page and Zoom; they are added to the address in the code (such as #page=3&zoom=page-width), which Chrome, Edge and Firefox follow. You can also hide the toolbar or open the side panel.
Does an embedded PDF work on phones?
+
Not always: many phone browsers show only the first page, or a button, instead of the PDF. That is why a Download link under it is on by default, so phone visitors can still open the file.
How do I embed a PDF from Google Drive?
+
Share the file as “Anyone with the link”, copy the link and paste it here. It is changed to Google’s preview address, which works in a frame. Google Drive uses its own viewer, so the page and zoom options don’t apply.
Do I need an account or a script?
+
No. The code is plain HTML (an iframe or object), with no script, no account and no third-party service. Nothing is hosted by us; the PDF loads from wherever you put it.
Is the preview safe?
+
The preview draws the PDF’s pages with this site’s page renderer, which never runs scripts inside a PDF. If the server holding the PDF doesn’t let other sites read it, choose a PDF from your device to see the preview.