Convert PDF to HTML
PDF to HTML converts a PDF with Poppler's pdftohtml and delivers a ZIP holding the HTML pages and their images. It is a layout dump rather than clean web markup, and it does not OCR.
Drag and drop files here, or click to choose
Accepts PDF · up to 500.0 MB per file · up to 20 files at once
You can also paste a file with Ctrl/Cmd+V, or from the clipboard menu.
PDF to HTML runs Poppler `pdftohtml -c` and zips whatever that tool writes into the output directory. The download is `{base}ToHtml.zip`, not a single `.html` file. Complex CSS from a browser is not the goal; this is Poppler's HTML and image dump.
There are no form fields. Every page is converted. If `pdftohtml` writes nothing, the API returns an internal error rather than an empty zip.
This is not OCR. Image-only scans become pictures inside the HTML package, not selectable text. Password-protected files are unlocked for you on this page once you enter the password; API callers run Unlock first.
If you only need the words, PDF to Text is smaller. If you need a CMS-friendly article, PDF to Markdown is closer.
What is inside the ZIP, from a run of Poppler's `pdftohtml -c` on a two-page text PDF: an `in.html` that is only a frameset, an `in_ind.html` index with one link per page, one HTML file per page (`in-1.html`, `in-2.html`), and one background PNG per page (`in001.png`, `in002.png`). The names start from your upload's file name. Open the file named after your upload to see the frameset with the page list on the left, or open a single page file directly. Another Poppler version may name or arrange things slightly differently.
Each page file positions every line of text with absolute coordinates, as separate paragraphs with `top` and `left` values in pixels, on top of the page's background image. In that run a 612 by 792 point page became an 918 by 1188 pixel block, 1.5 times the point size, and the text stayed real, selectable HTML text rather than a picture. Because every line is pinned to a pixel position, the result looks like the PDF but does not reflow on a narrow screen and is awkward to edit.
Understand this as a fixed-layout copy, not a clean web article. Headings, lists and paragraphs are not rebuilt as semantic HTML elements. If you want content you can drop into a CMS, convert to Markdown instead. If you want an editable document for people, use PDF to Word. If you want the plain words only, use PDF to Text.
Scanned PDFs have no text layer to convert. Each page is an image, so the HTML pages wrap that picture and there are no words to select. A searchable PDF from OCR PDF does not change that: in a test, the HTML for one still held only the page picture, because Poppler leaves out hidden text. For the words, use OCR PDF to Text or the Markdown output of OCR PDF.
The reverse direction is HTML to PDF, which makes a PDF from an HTML page and does not undo this conversion.
Features
- Poppler `pdftohtml -c` into a ZIP of HTML and assets
- One HTML file per page plus an index and a frameset page
- Text is positioned absolutely over a background image of each page
- No page-range or theme options
- Not OCR; scans stay as images in the package
- Anonymous API at /api/v1/convert/pdf/html
When to use this tool
- Get a rough HTML dump of a text-layer PDF
- Pull embedded page images that pdftohtml extracts
- Inspect how Poppler sees the file before a custom pipeline
- Read a fixed-layout copy of a PDF in a browser without a PDF viewer
- Collect the per-page text positions as a starting point for your own scraping or conversion script
How do I convert a PDF to HTML?
- Upload a PDF whose pages contain selectable text; a scan will convert to images only. There are no conversion options on this page.
- Click Process and download `{name}ToHtml.zip`, then unzip it into its own folder so the page files and images stay together.
- Open the main HTML file in a browser to see the frameset, or open a single page file such as the `-1.html` one.
- Compare a page with the PDF: check that lines are in the right place and that the background image loads. If the page shows no image, make sure the PNG files sit next to the HTML.
- If the text is missing or the layout is unusable, try PDF to Text for the words or PDF to Markdown for structure, or use OCR PDF to Text if the file is a scan.
Limits and edge cases
- Output is a ZIP, not one HTML file
- Not a Chromium print or tagged-PDF HTML export
- Empty pdftohtml output is an error, not 204
- Fixed layout: no reflow, and no semantic headings or lists
- Every page is converted; there is no page range
- Scans give images only
- Upload limit on this website: 500 MB per file, sent in chunks above about 95 MB. A single direct API request body is capped at 100 MB.
Examples
- A two-page text PDF produced `in.html` (a frameset), `in_ind.html` (a page list), `in-1.html` and `in-2.html` (one per page) and `in001.png` and `in002.png` (backgrounds) in a test run
- In that run the first page file held each text line as an absolutely positioned paragraph, for instance at 119 pixels from the top and 108 from the left, over an 918 by 1188 pixel background image
- A scan-only PDF yields HTML that mostly wraps those page images
Privacy for this tool
Files are uploaded over HTTPS, processed in memory or a short-lived temporary directory on our servers, and deleted when your result is ready. We do not keep copies for later browsing, training, or advertising profiles. See the Privacy Policy for retention details and AdSense cookie disclosures.
Frequently asked questions
- Why is the result a ZIP?
- pdftohtml writes HTML plus extracted images into a folder. The server zips that folder.
- Will the HTML match my PDF layout?
- Only as well as Poppler's -c mode does. Multi-column magazines and heavy vectors often look wrong.
- Can I convert a scan to HTML text?
- No. This path does not OCR, and a searchable PDF from OCR PDF still comes out as page pictures. Use OCR PDF to Text or the Markdown output of OCR PDF if you need the words.
- Does it run in the browser?
- No. The server shells out to pdftohtml.
- Which file do I open first after unzipping?
- Open the HTML file that carries your upload's name to get a frameset with a page list on the left. Or open a page file directly, which is named after the upload with the page number. Keep everything in one folder so the background images load.
- Why does the page look like the PDF but the text will not reflow?
- Each line of text is placed with absolute pixel coordinates over a background image of the page, so the layout is fixed. That is what keeps it close to the PDF and also why it does not adapt to a small screen.
- Is the text in the HTML real text or a picture?
- For a PDF with a text layer, it is real text in paragraph elements, so you can select, copy and search it in a browser. A scanned PDF has no text layer, so the pages come out as images only.
- Can I get one HTML file with everything in it?
- No. The output is always a ZIP of several files. If you need a single file of text, use PDF to Text or PDF to Markdown.
- Should I use this or PDF to Word?
- Use PDF to HTML when you want something a browser can open and that looks like the PDF. Use PDF to Word when a person has to edit the content, since that tool rebuilds paragraphs for an editor rather than pinning lines to coordinates.
Last updated:
Call this from code
Every tool on this site is a plain REST endpoint - no account or API key needed for anonymous use. Built for AI agents and developers as much as for browsers.
curl -X POST "https://pdf123.xyz/api/v1/convert/pdf/html" \
-F "[email protected]" \
-o output.pdfAlso available as an MCP tool for agent clients that speak Model Context Protocol (JSON-RPC 2.0 over POST /mcp). Full API reference
Use it from an AI agent
SkillClaude Code, Codex, Cursor and other AI agents can run PDF to HTML for you with this skill: /skills/pdf123-pdf-to-html.md
Files are used only for this processing job and deleted automatically afterward.