PDF to HTML turns a PDF into a single self-contained HTML file. Each page is rendered as a JPEG or PNG image, and an invisible text layer sits on top at the original text positions — so the page looks exactly like the PDF but the text is still selectable and searchable (Ctrl/Cmd+F). Add the PDF from your device, Google Drive or Dropbox, pick a DPI and image format, optionally exclude pages, then download the .html. Everything runs in your browser, so the file never leaves your device. Links, form fields and embedded fonts are not carried over.
What is a PDF to HTML converter?
A PDF to HTML converter turns a fixed-layout PDF into a web page that any browser can open. The output is a single HTML file with embedded CSS, base64 images and — optionally — an invisible text layer over each page. That combination gives you the best of both worlds: the visual fidelity of the original PDF, and the searchability, copyability and portability of a plain web page.
This is different from reflowing a PDF (which PDF to EPUB does). Reflowing throws away the original layout so text can adjust to any screen. Rendering to HTML preserves the original page as an image and overlays it with selectable text. Choose reflowing for reading on phones, and rendering for exact visual fidelity — publishing a scanned document, sharing an annotated page, or embedding a PDF page as part of a web page.
The tool uses pdf.js to read the PDF, render each page to a canvas and extract the text positions. You can read more about the PDF format on the Wikipedia article and about HTML on the MDN HTML reference.
How to convert PDF to HTML in 5 steps
The process is short and needs no account. Follow these steps and the first HTML file will be ready in under a minute.
- Add your PDFDrag a PDF onto the upload card, click Browse, or import directly from Google Drive or Dropbox. The tool renders a thumbnail for every page inside your browser using pdf.js.
- Pick the pages to includeEvery page is included by default. Click the checkbox on any thumbnail to exclude that page from the output — useful for skipping covers, blank pages or internal spreads.
- Choose quality and formatPick 96, 150 or 220 DPI for the page images, choose JPEG or PNG, and adjust the JPEG quality. Higher DPI is sharper but produces a larger HTML file.
- Toggle the text layerKeep the text layer on to make the output selectable and searchable (Ctrl/Cmd+F). Turn it off for a smaller image-only file. The live preview updates as you change settings.
- Convert and downloadClick Convert to HTML. Watch the progress ring, then download the .html file, open it in a new tab, or share it with friends and colleagues.
Rendering speed depends on page count and DPI. A 20-page PDF at 150 DPI usually finishes in a few seconds; a 200-page PDF at 220 DPI can take a couple of minutes because every page is rendered on a canvas, encoded to JPEG or PNG, and embedded as base64.
Everything the converter can do
| Setting | Options | What it does |
|---|---|---|
| Render quality | 96 / 150 / 220 DPI | Controls page image sharpness and file size. 150 DPI is the balanced default. |
| Image format | JPEG / PNG | JPEG is smaller; PNG is lossless. PNG is 2–4× larger for the same page. |
| JPEG quality | 10 – 100 | Lower is smaller and softer. 82 is the default and a good balance for text. |
| Text layer | On / off | Adds invisible spans so the page text is selectable and searchable. |
| Page selection | Include / exclude | Every page is included by default. Click a thumbnail checkbox to exclude it. |
| Live preview | Automatic | An iframe shows the HTML output as you change settings. |
| Import sources | Device, Google Drive, Dropbox, clipboard | Loads the PDF without leaving the browser. |
How the selectable text layer works
PDF pages store every text item with a font and an exact x/y position in points. The tool reads those positions and places an invisible <span> at the same location on the rendered image. The spans have transparent colour, but the browser still treats them as real text — so selecting them highlights the text on the image, Ctrl/Cmd+F finds them, and copy-paste works.
When it helps
Publishing a PDF as a web page, embedding a form on a landing page, or making an online archive searchable. Users can copy citations without needing the original PDF.
When to turn it off
If you only need a visual copy of the pages, or the PDF is scanned (no text layer exists), turn it off. This shrinks the HTML file dramatically on text-heavy PDFs.
What it doesn't do
The layer is positioned text, not a reflow. It uses system fonts so the highlight may be slightly offset from the image text, and it does not preserve links, form fields or annotations.
Honest limit: the text layer is an overlay. Each <span> sits at the exact position of the original text, but the font may not match perfectly if the PDF uses an uncommon typeface. Selection highlights still follow the original text, and search always works. Links, forms and annotations are not carried over — use PDF to Word or PDF to EPUB if you need a truly editable output.
DPI and file size
DPI is the main lever for file size. Doubling DPI quadruples the number of pixels per page, and the base64 encoding adds another 33% overhead.
| DPI | Page pixels (A4) | Typical use | Relative size |
|---|---|---|---|
| 96 | ~794 × 1123 | Screen viewing, quick previews | Smallest |
| 150 | ~1240 × 1754 | Laptops, tablets, general sharing | Medium |
| 220 | ~1820 × 2573 | High-DPI screens, printing, archives | Largest |
Rule of thumb: start with 150 DPI JPEG at quality 82. That is sharp enough for almost any screen and keeps a 50-page PDF under 5 MB. Switch to 96 DPI for a very large PDF, or 220 DPI when you plan to print.
Your PDF stays private
Everything happens in your browser. The PDF is loaded with pdf.js, each page is rendered to a canvas, and the HTML is assembled in JavaScript. Nothing is uploaded, logged or stored. When you close the tab, the file is gone from memory.
- Local processing. Page rendering and HTML assembly both run on your device, so confidential documents never leave your computer or phone.
- Direct cloud downloads. When you import from Google Drive or Dropbox, your browser fetches the file straight from that provider after you grant access.
- No account needed. You can convert without signing in. Read our privacy policy for details about the site itself.
Tips for better HTML output
- Preview before download. The iframe updates as you change settings, so you can see the result without waiting for a full conversion.
- Trim cover pages and blanks. Click the checkbox on a thumbnail to exclude it — the resulting HTML only carries the pages you want.
- Use JPEG for text pages. JPEG quality 82 is nearly indistinguishable from the original for document scans at 150 DPI.
- Use PNG for line art. Diagrams, charts and screenshots look cleaner in PNG.
- Turn off the text layer for scanned PDFs. If the PDF has no text to begin with, the text layer adds bytes for nothing.
- Compress the source PDF first. Smaller PDFs render faster. Run them through our Compress PDF tool.
Common problems and quick fixes
| Problem | Likely cause | Fix |
|---|---|---|
| HTML is very large | High DPI with PNG and the text layer on | Switch to 96 DPI, use JPEG, or turn off the text layer. |
| Text isn't selectable | The text layer was turned off | Enable Selectable / searchable text before converting. |
| Text is selectable but highlighted oddly | Unusual PDF fonts mapped to system fonts | Normal behaviour. The highlight follows the original text positions, not the visible glyphs. |
| Preview is blank | Pages excluded, or browser blocked the iframe | Re-enable at least one thumbnail, or reload the page if the iframe was blocked. |
| Open in new tab does nothing | Browser blocked pop-up | Allow pop-ups for this site, or use Download HTML instead. |
| Cloud import fails | The sign-in window was blocked | Allow pop-ups for this site, then press the Drive or Dropbox button again. |
Import from Drive and Dropbox, then share
You do not need to download the PDF to your phone first. The upload card includes Google Drive and Dropbox buttons, and the editor toolbar repeats them. The provider opens its own file picker, you select the PDF, and the tool downloads it into the page list with a live progress bar.
After conversion, the share panel appears under the download button. You can post a link to the tool on WhatsApp, Facebook, X, LinkedIn or Telegram, send it by email, or copy the link. On phones and tablets that support the Web Share API, the Share HTML file button opens the system share sheet with the page attached.
Related PDF tools
These pair naturally with PDF to HTML and are all free.
Frequently asked questions
Is the PDF to HTML converter free?
Does the tool upload my PDF to a server?
Can I import PDFs from Google Drive or Dropbox?
How does the output work?
What are the DPI options?
Should I choose JPEG or PNG?
Why does turning off the text layer shrink the file?
Are links, form fields and embedded fonts preserved?
What kind of PDFs work with this tool?
Does it work on iPhone and Android?
How large will the HTML file be?
Can I edit the HTML after downloading?
Ready to build your web page?
Load a PDF, pick a DPI and image format, and download a self-contained HTML file in seconds. Free, private and built for every device.
Convert PDF to HTML