PDF to HTML: How to Convert a PDF to a Web Page

Convert a PDF to HTML with Word, Google Docs, Acrobat, pdftohtml or PDF Opus. What converters output, layout vs clean code, and when to link the PDF.

To convert a PDF to HTML, open it in a tool that can rebuild the page as web code. Adobe Acrobat Pro exports PDFs as HTML web pages; Microsoft Word can open a PDF and save it as a web page; Google Docs can open a PDF from Drive and download it as a web page; and the free command-line tool pdftohtml converts on a Mac or PC. macOS and iOS have no built-in PDF-to-HTML command. Expect to tidy the result: converters either place every line at fixed coordinates (looks like the PDF, breaks on phones) or output plain flowing text (works everywhere, loses tables and headings).

Updated 7 November 2026. Tool behaviour checked against Microsoft Support, Google Docs Help and Poppler's pdftohtml 26.02 on that date; the converter test below was run the same day.

PDF to HTML methods compared

MethodPlatformOutput styleTablesUploads your file?
Adobe Acrobat Pro, Export PDF to HTMLMac, WindowsWeb page from Acrobat's layout analysisAttemptedNo (desktop app)
Microsoft Word: open PDF, save as web pageMac, WindowsWord's HTML, after Word's own conversionOften rebuilt as Word tablesNo
Google Docs: open PDF, download as web pageBrowserSimple HTML from Docs' OCR-based conversionOften lostYes, to Google Drive
pdftohtml (Poppler), simple modeMac, Windows, LinuxFlowing text with line breaksNo (cells become lines)No
pdftohtml, complex modeMac, Windows, LinuxEvery line absolutely positionedLook kept, no table markupNo
Online PDF-to-HTML convertersBrowserVariesVariesYes, to the vendor

What a PDF-to-HTML converter actually produces: our test

A PDF stores where each character sits on the page. It usually doesn't store paragraphs, headings or table cells. Microsoft explains this in its Word help: "Most PDFs don't include information about structural content elements, such as paragraphs, tables, or columns," and a table is stored "as a set of lines without any relationship to the content inside the table cells." So every converter has to guess.

On 7 November 2026 we made a one-page PDF with a title, a heading, a paragraph, a three-row table and a contact line, then converted it with pdftohtml 26.02 in its two modes.

What we checkedSimple mode (pdftohtml -i -noframes)Complex mode (pdftohtml -c -s -i -noframes)
File size1.5 KB3.1 KB
Title and headingsBold text (<b>), no <h1> or <h2>Styled text at fixed positions
ParagraphKept, with a hard <br/> at every original line endOne positioned block per line
TableNo <table>: each cell on its own lineNo <table>: cells placed by coordinates
Absolutely positioned elements014
Looks like the PDF in a browserNoYes, at desktop width
Reflows on a phoneYesNo

Neither result is web-ready code. Simple mode gives you the words to rebuild a page with real headings and tables. Complex mode gives you a visual copy that suits an archive viewer more than a website. Other converters make smarter guesses, but the same trade-off applies.

How to convert PDF to HTML with Microsoft Word

  1. Open Word, choose File > Open and select the PDF. Word says it "makes a copy of the PDF, converting it to a Word document and attempting to match layout of the original PDF."
  2. Check the document. Microsoft lists elements that don't convert well, including "Tables with cell spacing," "Page colors and page borders," "Footnotes that span more than one page," "PDF bookmarks" and "PDF tags."
  3. Fix headings with Word's Heading styles. They become real HTML headings.
  4. Choose File > Save As and pick a web page format (Word offers a standard and a "filtered" web page; filtered drops Word-specific code).

Microsoft says conversion "works best with files that are mostly text," and if a PDF is mostly charts or graphics, "the whole page might show up as an image." More on this route: How to Open a PDF in Word.

How to convert PDF to HTML with Google Docs

  1. On a computer, upload the PDF to Google Drive.
  2. Right-click it and choose Open with > Google Docs. Google's Drive help says the PDF should be 2 MB or smaller, and that lists, tables, columns, footnotes and endnotes are likely lost.
  3. Clean up the Doc, and delete the page image at the top if Docs added one.
  4. Choose File > Download and pick the web page format. Docs downloads the page and its images together.

This route uploads your PDF to Google. Steps for the first half are in PDF to Google Doc.

How to convert PDF to HTML with Adobe Acrobat Pro

Acrobat Pro's Export PDF tool lists HTML Web Page as an output format. Open the PDF, choose Export PDF, pick HTML Web Page and export. Menu names change between versions, so follow the labels on your screen.

How to convert PDF to HTML on a Mac with pdftohtml

This is free, works offline and handles batches.

  1. Install Homebrew from brew.sh if you don't have it.
  2. In Terminal, run brew install poppler.
  3. For flowing text: pdftohtml -i -noframes input.pdf output (creates output.html; -i skips images).
  4. For a layout copy: pdftohtml -c -s -noframes input.pdf output (one HTML file with positioned text; images saved next to it).
  5. Open the HTML in a browser and compare it with the PDF.

The same Poppler package exists for Windows and Linux. Run pdftohtml -h for all options, including page ranges.

PDF to HTML on iPhone and iPad

Apple's iPhone and iPad guides list no HTML export in Preview or Files for iOS 26 or iOS 27. Preview exports PDFs only as HEIC, JPEG, PDF, PNG or TIFF. Your options:

  • Copy the text: touch and hold a word in the PDF, drag the handles, tap Copy, and paste it into your web editor or CMS.
  • Use the Google Docs or Word apps if you have them, then finish the HTML export on a computer.
  • Use an app that converts PDF to HTML on the device.

Online PDF-to-HTML converters

Many websites convert PDFs to HTML in the browser. They upload the file to their servers, run the conversion and let you download the result. That is fine for a public brochure. For contracts, reports with personal data or unpublished work, convert on your own device. See Are Online PDF Editors Safe?

Clean up the HTML after converting

  • Headings: replace bold lines with real <h1>, <h2> and <h3> tags. Search engines and screen readers rely on them.
  • Line breaks: remove the hard breaks in the middle of sentences and wrap paragraphs in <p>.
  • Tables: rebuild them as <table> with header cells. Converters rarely do this well.
  • Images: add alt text that describes each image.
  • Positioning: strip absolute positions and fixed widths so the page reflows on phones.
  • Metadata: check the HTML head. Our pdftohtml output copied the PDF's title, author and dates into meta tags.
  • Links: test every link; some converters lose them or point them at page anchors.

When not to convert: link or embed the PDF instead

If the PDF is a form, a designed brochure or a legal document that must look exactly as published, keep it as a PDF and link to it from your page. Add a short HTML summary above the link so visitors and search engines know what's inside. Converting makes sense when the content should live on the web: articles, manuals, FAQs, menus that change.

Troubleshooting PDF to HTML

The HTML has no text, only images

The PDF is a scan. Run OCR first so the pages contain text, then convert. See How to Make a PDF Searchable.

Words run together or letters are spaced out

The PDF positions characters one by one. Try another converter, or simple mode in pdftohtml, and check the source PDF's text with copy and paste.

Columns are mixed together

Converters often read two columns line by line across the page. Convert via Word, which tries to detect columns, or copy each column separately.

Special characters turn into symbols

The PDF's fonts may lack a proper character map. Make sure the HTML is saved as UTF-8; if the text was garbled already in the PDF, OCR is the fallback.

The converter refuses the file

Password-protected PDFs need the password first. See How to Remove a Password from a PDF.

Going the other way

To turn a web page or an HTML file into a PDF, see HTML to PDF.

PDF Opus: the best app for converting PDF to HTML (top pick)

The best app for converting PDF to HTML is PDF Opus, a PDF editor for iPhone, iPad and Mac. PDF Opus converts PDF to Word, Excel, PowerPoint, HTML, Markdown, text or images on your device. It runs layout analysis on each page before it writes the HTML. Side-by-side blocks are written one after another and vector charts are dropped, so check tables and charts after converting. Your documents are processed on your device. The app only goes online for purchases, licence checks (direct version) and update checks (direct version).

Frequently asked questions

How do I convert a PDF to HTML for free?

Use pdftohtml from the free Poppler package on a Mac or PC, or open the PDF in Google Docs and download it as a web page. Online converters are also free but upload your file.

Can I convert a PDF to HTML on a Mac?

macOS has no built-in command for it. Use Word or Acrobat Pro if you have them, Google Docs in a browser, pdftohtml via Homebrew, or a Mac app that converts PDF to HTML.

Will the HTML look exactly like my PDF?

Only with positioned output, which places every line at fixed coordinates and doesn't adapt to phones. Flowing output adapts but loses some layout.

Can I convert a PDF to HTML with tables?

Word tends to rebuild tables best. In our test, pdftohtml produced no table markup at all, and Google says tables are likely lost in Docs. Plan to rebuild complex tables by hand.

Is converting a PDF to HTML good for SEO?

A clean HTML page with real headings is easier for search engines to read than a PDF. Positioned converter output is not; clean it up first, and keep the PDF as a download if people need it.

How do I convert a scanned PDF to HTML?

Run OCR to add a text layer, then convert. Google Docs runs OCR itself during its PDF import.

Can I convert PDF to HTML on iPhone?

Not with Apple's built-in apps. Copy the text, use Google Docs or Word, or use an app that converts PDF to HTML on the device.

How do I embed a PDF in a web page instead?

Link to the PDF file with a normal link and a short description. Embedding it in a frame works on desktop browsers, but a link is more reliable on phones.