Embed PDF Online: Free Options, Embed Code, Responsive Sizing and Flipbook Alternatives
Want a PDF to appear right inside your web page instead of a download link? This article compares free embed methods, shows copy-ready iframe code, fixes mobile sizing problems, and explains when a flipbook is the smarter choice.
You have a PDF, a web page, and one annoying question: how do you show the document right there on the page instead of sending visitors off to a download? The short answer is that you can embed PDF online in about two minutes, and plenty of free methods will do it. The longer answer is that free methods come with trade-offs on phones, on slow connections, and in what you can measure afterward. This article walks through every practical route, from a single line of iframe code to a polished page-turning viewer built with Flipbooks AI.
By the end you will know which method fits your page, how to size it so it does not break on a phone, and when it makes sense to stop fighting a plain PDF viewer and switch to a flipbook.
Why Embed a PDF at All
A PDF link is the laziest way to share a document. The visitor clicks, a new tab opens or a file downloads, and your page loses them. Embedding keeps the reader on your site, next to your branding, your call to action, and your other content.
Link vs embed: the real difference
Approach
What the visitor sees
Stays on your page
Works well on mobile
Plain download link
File downloads or opens in a new tab
No
Depends on the phone
Basic iframe embed
Browser PDF viewer inside your page
Yes
Often limited
Third-party viewer embed
Hosted viewer inside your page
Yes
Usually decent
Flipbook embed
Page-turning reader inside your page
Yes
Built for it
💡 Pro tip: Before choosing a method, decide what you want after the reader finishes. If the answer is "buy something" or "fill in a form," keep them on the page. That alone argues for embedding.
Who gets the most from embedding
Restaurants that want the menu visible without a download prompt
Real estate agents showing a property brochure beside the listing
Course creators placing a worksheet next to the lesson text
Freelancers putting a portfolio on their homepage
Nonprofits publishing an annual report inside a donation page
Free Ways to Embed a PDF
Free does not mean bad. For a single internal document or a quick personal site, a free method is often enough. Here are the three you will actually use.
Google Drive preview embed
Upload the PDF to Google Drive, set sharing to "Anyone with the link," then copy the file ID from the URL. Your embed code looks like this:
It is quick and requires no hosting. The downsides: the Google toolbar appears, you have no control over the look, and links can be shut off if the file is moved or sharing changes.
Direct file in a browser iframe
If you host the PDF on your own server or CDN, point an iframe straight at it:
<iframe
src="https://example.com/files/menu.pdf#toolbar=0&navpanes=0"
width="100%"
height="700"
title="Restaurant menu PDF">
</iframe>
The text after the # passes hints to the browser's built-in viewer, such as hiding the toolbar. Those hints are not part of any strict standard, so Chrome, Edge, Firefox and Safari handle them differently.
Free plugins and site builders
WordPress, Wix, Squarespace and similar builders offer free blocks or plugins for PDF display. They are friendly if you dislike editing HTML. Most free tiers show an ad bar, limit file size, or add a small badge.
Free option
Setup time
Branding control
Limits to expect
Google Drive preview
2 minutes
None
Google toolbar, link depends on sharing
Direct iframe
5 minutes
Low
Browser-dependent, weak on mobile
Site builder block
5 to 10 minutes
Low to medium
File size caps, possible ads or badges
Free viewer service
5 minutes
Low
Watermark or badge on free plans
⚠️ Warning: Free viewer services sometimes insert a logo or ad into your embed. Check a live example on a phone before you publish.
The Basic Embed Code Explained
Three HTML tags can display a PDF: iframe, object, and embed. You only need one.
The iframe tag
This is the safest choice for most people because it works with both hosted files and third-party viewers. Add a title attribute so screen readers announce what the frame contains. Add loading="lazy" if the PDF sits below the fold, which keeps the page fast.
The object tag lets you provide a fallback when the browser cannot render the file:
<object data="report.pdf" type="application/pdf" width="100%" height="800">
<p>Your browser cannot display this PDF.
<a href="report.pdf">Download it here</a>.</p>
</object>
That fallback link matters. On many phones the embedded PDF never renders, and without a fallback the visitor sees a blank box.
Common embed mistakes
Using a fixed pixel width. A width="900" frame spills off a phone screen.
Skipping the title attribute. Accessibility audits flag it immediately.
Linking to a file that blocks framing. Some servers send headers such as X-Frame-Options: DENY, which makes the frame blank.
Hosting on a different protocol. An http file inside an https page is blocked by browsers as mixed content.
Forgetting a download fallback. Always give people a way out.
Responsive Sizing That Works
This is where most embeds fall apart. A PDF page is tall and narrow, while a desktop layout is wide and short. Getting both to look right takes a few lines of CSS.
The aspect ratio wrapper
Wrap the iframe in a container and let CSS hold the shape:
An aspect ratio of 3 by 4 suits portrait A4 or Letter pages. For landscape slides, switch to 16 / 9.
Suggested sizes by device
Device width
Suggested frame width
Suggested height
Notes
Phone (under 480px)
100%
70 to 80vh
Add a download button below
Tablet (481 to 1024px)
100%
75vh
Portrait looks best
Laptop (1025 to 1440px)
Up to 900px
800px
Center the frame
Large monitor (1441px+)
Up to 1000px
900px
Do not stretch to full width
What actually happens on mobile
Here is the uncomfortable truth. Mobile Safari on iPhone generally shows only the first page of an embedded PDF, and you often cannot scroll through the rest inside the frame. Many Android browsers skip inline rendering and offer a download instead. If a large share of your visitors browse on phones, a plain iframe is a gamble.
💡 Pro tip: Open your page on a real phone, not just a resized desktop window. Browser emulators do not reproduce how mobile browsers handle PDF files.
Quick checks before you publish:
Test on iPhone Safari and Android Chrome
Confirm the visitor can reach page two and beyond
Place a visible "Open full PDF" button beneath the frame
Keep file size under 10 MB when possible
Where Free Options Fall Short
Free embeds do the job until you need more than "show the file." The gaps tend to appear after launch, when someone asks a simple question.
No way to measure readers
An iframe pointing at a raw PDF tells you nothing. You cannot see how many people opened it, which pages they read, or where they left. Your page analytics may record a visit, but the document itself stays a black box.
No branding, no passwords
A raw PDF viewer looks like a raw PDF viewer. You cannot match colors, add a logo, or lock a private document behind a password. For client proposals, internal manuals or paid material, that is a problem.
Reading experience on small screens
Pinch zoom inside an iframe fights with page scrolling. Readers get stuck, give up, or tap the download link and never come back. A dense menu or catalog suffers most because small text needs zoom.
Need
Basic iframe
Flipbook embed
Works on iPhone and Android
Inconsistent
Yes, built for touch
Custom branding
No
Yes
Password protection
No
Yes
Reader analytics
No
Yes, on the Professional plan
Page-turning feel
No
Yes
Offline download option
Manual
Yes
Embed video and audio
No
Yes
Flipbook Alternatives That Embed Better
A flipbook converts your PDF into a responsive, page-turning reader. It still embeds with a short snippet of code, but the viewer is designed for screens of every size instead of borrowed from a browser.
What a flipbook adds
Smooth page turns that feel like holding a magazine
Responsive layout that switches between spread and single-page views
Search and zoom that work with touch
Custom branding so the viewer matches your site
Links and media inside the pages, including video and audio
Readers tend to stay longer on content that feels like a publication instead of a file. A catalog, a lookbook, a menu and an annual report all benefit from that shape.
Wait while the platform converts each page into a flipbook spread. Most files finish within moments.
The converter keeps text sharp and preserves links already inside your PDF. No watermark is added, ever.
Step 3: Customize the look
Open the editor and adjust:
Branding: upload your logo and choose brand colors
Page effects: pick how pages turn and how the background looks
Multimedia: add video and audio to pages where it helps
Toolbar: show or hide download, share and zoom buttons
💡 Pro tip: Use a background color that matches your site. The embed then looks like part of the page and not a box dropped in.
Step 4: Copy the embed code
Choose the share option and copy the embed snippet. Paste it into your page's HTML, a WordPress custom HTML block, or the embed element in your site builder. The Embed Flipbook on Website tool has more detail on placement. You can also share a direct link or protect a private flipbook with a password.
✅ Best practice: Keep the frame at 100% width inside a container with a sensible max width. The flipbook then scales without extra scripts.
Step 5: Analytics and lead capture
On the Professional plan you get reader analytics and lead generation. See which pages hold attention, which links get clicked, and collect an email before someone opens a gated document. Offline downloads let readers save the flipbook for later, which is helpful for field teams and travelers.
Choosing the Right Method
Match the method to the job. Do not over-build a simple page, and do not under-build one that carries your brand.
Your situation
Recommended method
Quick personal page, one short file
Google Drive preview or direct iframe
WordPress site, no coding
Site builder block with a download fallback
Mobile-heavy audience
Flipbook embed
Need password, branding or analytics
Flipbook embed on a paid plan
Catalog, menu, lookbook or portfolio
Flipbook embed
Compliance document where layout is fixed
Direct embed plus a download link
A few final habits that save headaches:
Compress the PDF before upload to cut load time
Name the file clearly, since the title shows up in browsers and search results
Add surrounding text on the page, because search engines read your words and not the inside of an embedded frame
Always offer a download link for people who prefer a file
Recheck embeds after any site redesign
Ready to Publish Your PDF?
If a quick iframe covers your needs today, use it and move on. If your readers use phones, if the document represents your brand, or if you want to know who read it, a flipbook is the better tool.