PDF to HTML
Convert a PDF into a web page - readable text, or page pictures.
This tool runs entirely in your browser. Your file is never uploaded, and you can verify that in your browser's network tab. Verify it yourself: open your browser's network tab and watch. You will see one small request asking whether you have tasks left - a tool name and a hash, never the file.
What this does
There are two ways to turn a PDF into a web page, and they suit different people, so both are here. Text mode writes headings, paragraphs, lists and links as real HTML: it will not look like the PDF, and that is the point, because it re-flows on a phone, it is searchable, and a screen reader can follow it. Page pictures mode renders every page as an image with the extracted text positioned invisibly over it - identical to the PDF, and close to useless on a small screen. Either way the result is one self-contained file.
Use text mode when a document has to be readable on a phone, indexable by a search engine, or usable with a screen reader - a policy, a manual, a report that people keep pinch-zooming. Use page pictures when appearance is the whole point and the file has to look like the original: a form, a certificate, a signed letter being shown rather than read.
How it works
- Drop the PDF onto this page. In text mode the file is checked for a text layer first, and a scan is refused with a pointer to OCR PDF.
- Pick the mode: text for a readable page that re-flows, page pictures for something that matches the original exactly.
- Leave Complete HTML document and Put the styles inside the file on unless you are pasting the result into a page you already have.
- In page pictures mode, set the resolution. 120 dpi is legible on screen; 200 dpi is sharper and roughly three times the bytes.
- Press Convert to HTML and the single .html file downloads.
The output is one file with its stylesheet inlined, so it opens from a folder or an email attachment without the missing-stylesheet page that a linked CSS file produces. It is also written to stay readable with CSS switched off entirely. That is partly an accessibility property and partly a proof of what is underneath: markup that means something, rather than a heap of absolutely-positioned spans arranged to look right.
Text mode reads the page in one column. Multi-column layouts, sidebars and text boxes are flattened into a single reading order, which is the trade you are making in return for a page that works at 360 pixels wide.
In page pictures mode the images are embedded as data URIs rather than written as a folder of files next to the HTML. Base64 costs about 33 per cent over the raw bytes, which is worth paying for a file that can be mailed as one attachment. It does mean a long document at 200 dpi becomes heavy, so start at the default and raise it only if the result looks soft.
Rendering and text extraction both happen in your browser through PDF.js. Nothing about the document is transmitted, including in page pictures mode, where the images are produced on your own device rather than by a rendering server somewhere.
What this tool cannot do
- Text mode does not preserve the layout. Columns collapse into one, absolute positioning is dropped, and the page reads top to bottom.
- Page pictures mode embeds every page as base64 inside the file, which adds about a third to the size of the images and makes a long document slow to open.
Questions people ask
- What is the difference between the two modes?
- Text mode extracts the words and writes real HTML - headings, paragraphs, lists, links - so the page re-flows and a screen reader can follow it. Page pictures mode renders each page as an image with the text laid invisibly over it, so the result matches the original and stays searchable, but does not adapt to the screen. Choose by what matters more: reading it, or recognising it.
- Will the HTML look like my PDF?
- In text mode, no, and deliberately not. Fonts, columns and page geometry are dropped so the content can re-flow to any screen width. In page pictures mode the result is visually identical to the PDF, because each page is a picture of it.
- Do the pictures inside my document come across?
- In page pictures mode yes, because the whole page including its illustrations is rendered as an image. In text mode no - the conversion writes text and structure only.
- Is the result one file or a folder?
- Always one file. The CSS is inlined and any page images are embedded as data URIs, so there is nothing to lose when the file is moved or mailed. Turning off Complete HTML document gives you a fragment to paste into an existing page instead.
- Does anything get uploaded?
- No. Text extraction and page rendering both run in a Web Worker in your browser, so the resolution setting affects how long your own machine works rather than how long a queue is. Watch the network tab during a conversion: the one request there asks whether you have tasks left, and carries a tool name and a hash rather than a page of the document.