Overview
Turns the text of a PDF into an HTML page. Reflowing mode writes semantic HTML with h1 to h3 headings and paragraphs that adapt to any screen, while positioned mode places every text run at its original coordinates on a page-sized box. You can preview the page, copy the code or download an .html file. The conversion runs on your device.
How It Works
Drop a PDF, pick Reflowing or Positioned layout and enter a page range if needed, then click Convert to HTML. A progress bar tracks the pages and can be cancelled. The preview shows the page in a sandboxed frame, and the HTML tab shows the source. Switching layout updates the output without reading the PDF again. Copy puts the code on the clipboard and Download saves an .html file with the PDF's name.
Step-by-Step Usage Guide
- Drop the PDF you want as a web page.
- Choose Reflowing for editing and the web, or Positioned to keep the layout.
- Click Convert to HTML.
- Check the preview, then copy the code or download the .html file.
Technical Specifications & Standards
Both modes start from the positioned text runs that pdf.js extracts. Reflowing mode groups runs into lines by baseline and lines into paragraphs by spacing and font size, then marks lines that are clearly larger than the body text as headings, which gives the page a real outline for screen readers and search engines. Each PDF page becomes a section with an id such as page-3, separated by a rule that disappears when printed. Positioned mode keeps the visual layout instead: every run becomes an absolutely positioned span measured in points, so the page looks close to the PDF but does not reflow on small screens. All text is HTML-escaped, and the output has no scripts or external resources. Images, vector graphics and fonts are not converted, so mixed text and picture layouts lose their pictures. Scanned PDFs need OCR before there is any text to convert.
Targeted Use Cases
- Publishing a PDF newsletter or report as an accessible web page.
- Pasting a document's text into a CMS with headings already marked up.
- Making a PDF readable on phones without pinching and zooming.
- Inspecting where each piece of text sits on a page for debugging.
Notes & Gotchas
- Use reflowing mode for anything people will read on phones.
- Review heading levels in the output, because they are guessed from font size.
- Add the images back separately, since only text is converted.
Frequently Asked Questions
How do I convert a PDF to an HTML web page?
Drop the PDF, choose Reflowing layout and click Convert to HTML. Then download the .html file, or copy the code and paste it into your site or CMS.
What is the difference between reflowing and positioned?
Reflowing writes headings and paragraphs that adapt to any screen width. Positioned places each text run at its original spot, which looks like the PDF but does not adapt to small screens.
Are images included in the HTML?
No. Only text is converted. Use Extract Images from PDF to save the pictures and add them to the page yourself.
Is the generated HTML safe to publish?
Yes. All text is escaped, and the file contains no scripts and loads no external resources, only inline CSS.
Related tools
- PDF to Text Extractor - Extract raw text from any PDF file in-browser using PDF.js. No upload to any server.
- PDF to Word (DOCX) - Convert a PDF into an editable Word .docx file in your browser, with headings detected by font size, one section per page, and an exact-layout option that places each page as an image.
- HTML to Markdown Converter - Convert HTML into clean GitHub-flavored Markdown - headings, links, images, lists, code blocks, and tables - with Markdown-significant characters safely escaped.
- HTML to PDF - Paste HTML or load an .html file, preview it on a real page size, and export a PDF with your choice of paper, orientation and margins. Scripts and event handlers are removed first.
- Sign PDF (Fill & Sign) - Sign a PDF by drawing, typing or uploading a signature, drag it into place on any page, add text and today's date, and download a flattened copy. No account and no upload required.
- PDF N-up (Pages per Sheet) - Print 2, 4, 6, 8, 9 or 16 PDF pages on each sheet, on A4, Letter, Legal, A3 or A5, with page order, margins, gaps and thin borders. Pages stay vector, so text remains sharp.