PDF to HTML — Convert PDF to a Web Page
Turn a PDF into HTML two ways: flowing semantic markup with headings and paragraphs, which is what you want for a page people will read, or absolutely positioned spans that mirror the original layout, which is what you want when position matters more than reading order.
Drop PDF files here or click to select
One or many · an .html per file
No PDF handy? Try sample-10-pages.pdf. More free sample files.
The two modes
Flowing reads the text layer, groups it into lines and paragraphs, promotes larger text to <h2> and <h3>, and wraps each PDF page in a <section>. The result is responsive, accessible, and searchable — a page rather than a picture of a page.
Positioned emits one absolutely positioned <span> per text run, with the original coordinates and font sizes in pixels. Nothing reflows, so it looks close to the PDF at its natural size — but it is unresponsive, awkward for screen readers, and painful to edit. It is genuinely useful for one thing: checking where text actually sits.
Standalone or fragment
A standalone file carries a minimal stylesheet and opens in any browser as-is. A fragment is just the markup — sections, headings, paragraphs — for pasting into a CMS or a template that already has its own styles. Everything is escaped, so text containing angle brackets shows as text rather than becoming markup.
What is not converted
- Images are not extracted or referenced. Pull them separately with Extract images and add them where they belong.
- Fonts are not embedded; the flowing output uses the system UI font stack, and the positioned output only carries sizes.
- Links are not turned into anchors here — get them with Extract links.
- Tables become paragraphs. Use PDF to CSV for tabular data.
FAQ
Which mode should I choose?
Flowing, unless you specifically need the original coordinates. Flowing output is readable on a phone, works with screen readers, and is easy to restyle; positioned output is a faithful but brittle snapshot.
Are the headings real headings?
Yes — <h2> and <h3>, inferred from font size relative to the document median. Check them before publishing, since a PDF with decorative large text will produce spurious headings.
Can I get the images too?
Not from this tool. Extract images pulls the embedded raster images out, and you can then reference them from the HTML.
What about scanned PDFs?
They have no text layer, so the conversion has nothing to read. Run OCR first, or use PDF to images and embed the page images instead.
Is my file uploaded?
No. Everything is parsed and generated locally.
Related tools
- PDF to Markdown — for docs and READMEs
- PDF to Word — an editable .docx
- HTML to PDF — the other direction
- Extract images — the pictures the HTML is missing
- Extract links — every URL in the document