PDF to HTML

Convert a PDF into a web page: clean HTML with real headings, lists, tables and links that fits every screen, or a page that looks just like the PDF.

Converted on your device: the PDF is never uploaded. The page has no scripts or outside files, so it opens anywhere.

How to convert PDF to HTML

  1. Choose a PDF with real text (up to 300 pages; 100 in the original-layout style). If it has a password, enter it when asked.
  2. Pick the style: Clean HTML to edit or publish the text, Original layout to keep the layout and pictures.
  3. Check the preview (or the HTML code), then download the .html file and open it in any browser.

How it works

Clean HTML: text sizes decide the structure. The size most of the text uses is body text, and lines 1.6, 1.3 and 1.15 times larger become <h1>, <h2> and <h3> headings. Bulleted and numbered lines become <ul> and <ol> lists, text set apart in columns becomes a <table>, bold and italic text become <strong> and <em>, and the PDF's web links become <a> links. Everything else is joined into <p> paragraphs; page numbers and running headers are left out unless you keep them, and pages are separated by a line (<hr>). All text is escaped, so nothing in the PDF can turn into code on the page.

Original layout: each page is drawn as a JPEG picture at 108 DPI, and every piece of text is placed over it, invisible, at its position on the page. The positions are percentages of the page, so pages shrink to fit a phone and the text stays where it belongs.

Example

The same page used for PDF to Markdown, with a 24 pt title, a 15 pt subheading, a paragraph, two lists and a link, becomes:

<h1>Project Handbook</h1>
<h2>Getting started</h2>
<p>Install the app from the store and sign in. Your data stays on your phone.</p>
<ul>
  <li>Open Settings</li>
  <li>Choose a theme</li>
</ul>
<ol>
  <li>Back up weekly</li>
  <li>Keep two copies</li>
</ol>
<p>Read <a href="https://palz.co.in/guide">the guide</a> for details.</p>

For notes and AI tools, PDF to Markdown gives the same structure as plain text. To go the other way, Markdown to HTML turns Markdown into a web page.

Frequently asked questions

Will the HTML look exactly like the PDF?

Choose the style. Original layout shows each page as a picture with its text laid over it, so the layout, fonts and images look the same and the text can still be selected and searched. Clean HTML rebuilds the text as headings, paragraphs, lists and tables that reflow to fit phones and are easy to edit.

Are tables and images included?

In Clean HTML, rows that line up in columns become <table> tables, but pictures are left out. In Original layout, everything on the page is included as part of the page picture.

Are links kept?

In Clean HTML, yes: web (http and https) and email links in the PDF become links in the page, and web addresses written in the text are linked too. Other kinds of links, such as scripts, are dropped.

Can I put the page on my website?

Yes. It's one self-contained file with a little built-in styling and no scripts or outside files. Paste the part between the body tags into your own page, or upload the file as it is.

Is my PDF uploaded? Can it open password-protected files?

Nothing is uploaded: the conversion runs in your browser. For a password-protected PDF, enter its password when asked; the HTML page has no password.

More PDF tools

See all PDF tools →

Can't find the tool you need? Tell us.