Turn a PDF into a web page

Turns the text of a PDF into one self-contained HTML file with real headings, paragraphs, lists and tables. Nothing is uploaded.

Drop your PDF file here or click to choose a file PDF file · processed on this device

PDF to HTML in three steps

A PDF has no headings. It has glyphs at coordinates, and what you read as a heading is a line that happens to be set larger than the lines around it. Turning one into a web page means working that structure out, and this tool says so rather than implying the file contained it.

The same reading that produces our Markdown output produces this one: lines are grouped into blocks, a block set larger than the body is a heading, a block starting with a bullet or a number is a list item, and everything else is a paragraph. Text that lines up in rows and columns becomes an HTML table, found the same way PDF to Excel finds one, with its first row as the headings. What differs is only how it is written out.

One file, not a folder

The output is a single HTML file. The styling is a few lines at the top of it rather than a stylesheet sitting beside it: a readable measure, a system font stack, and a dark mode that follows your setting.

That matters more than it sounds. Most converters produce a page plus a folder of assets, and the page stops working the moment somebody moves it or emails it on its own. One file cannot come apart.

The font is a system stack rather than a webfont on purpose. A converter that makes its output depend on a font it did not include has produced a file that looks different on whichever machine opens it.

Text from a PDF is text from a stranger

The words in the file you upload can say anything, including <script>. Written straight into a page, that stops being text and starts being code the moment the page is opened.

So every piece of text is escaped on the way out, in one place, and the tests put a script tag, an image with an event handler, a bare ampersand and a quote through the whole pipeline and read the output back to check that none of them came out as markup. A converter that gets this wrong turns a document into a page that runs somebody else’s code, on your machine, in your browser.

What it does not carry over

Pictures. Columns as columns. Merged table cells. Footnote links, forms, annotations.

Text is what a PDF makes recoverable with confidence; the rest is a layout that would have to be inferred, and inferring it produces a page that looks nearly right and is wrong in a way you cannot see. For pictures, Extract images pulls them out at their original size. For a table you want to sort or total, PDF to Excel puts the same grid in a spreadsheet.

It needs real text

A scan is a picture of a page. There is nothing to group and nothing will be found, so rather than hand you an empty page the tool says so. If selecting text in your own PDF reader does not work, run the file through OCR first.

Nothing leaves the device

The document is read and the page is written by a worker inside your browser. There is no upload, no account and no server copy. The file never goes anywhere, which is the point when the document is a contract, a statement or a draft nobody else should see yet.

  1. 1

    Choose a PDF with a text layer

  2. 2

    Let the headings, lists and tables be worked out

  3. 3

    Download one HTML file

Frequently asked questions

How does it know what is a heading?

From the size and position of the text. A PDF has no headings, only glyphs at coordinates, so a line set larger than the body of the page is treated as one and the level follows how much larger it is.

Are the pictures included?

No. This converts the text. Use Extract images to pull the pictures out as their own files.

Is it one file or many?

One. The styling is a few lines at the top of the file rather than a stylesheet to keep next to it, so the page works wherever you put it.

Does it work on a scan?

Only if the scan has a text layer. Run it through OCR first if selecting the text in your own reader does not work.

Does the file leave my computer?

No. The document is read and the page is written by a worker inside your browser, with no upload, account or server copy.

Related guides

Why a converted PDF never looks right in WordA PDF stores glyphs at coordinates, not paragraphs, so converted documents lose layout. What survives conversion, what cannot, and when to stop.