Convert a PDF to HTML

converts a PDF into a standalone HTML page with a selectable text layer, without uploading any file; the conversion happens entirely in your browser

Drop a PDF here, or click to choose one

Your file never leaves your browser.

Render quality

What is PDF to HTML conversion for?

This tool turns a PDF file into a standalone HTML page that faithfully reproduces the appearance of the original, page by page, while keeping the text selectable and copyable.

The HTML produced is a single, self-contained document: each page of the PDF becomes a positioned block, with the page image in the background and a transparent text layer on top. You can preview it, download it or copy it in one click.

How does the tool work?

The entire conversion takes place in your browser, thanks to the pdf.js rendering engine (the same one Firefox uses). Your file is never sent to a server: this is a decisive advantage for confidential, contractual or regulatory documents.

Each page is rendered as a high-definition image (you choose the quality), then an invisible text layer is overlaid to allow selection and search. You can disable this layer if you only want a visual rendering.

Common use cases

  • Embed a PDF in a web page while keeping the text selectable.
  • Archive or share a document in a viewable form without a PDF reader.
  • Extract and copy the text of a PDF page by page.
  • Quickly preview the contents of a PDF without dedicated software.

What fidelity can you expect?

The visual rendering is very faithful, because each page is an image produced by the PDF engine itself: fonts, layout, colours and graphics appear just as in the original.

However, this is not a "semantic", re-editable HTML: vector graphics are rendered as images, and the text layer is primarily there for selection, with its positioning being approximate. For a scanned PDF (an image with no text), no text layer can be generated without optical character recognition (OCR).

Frequently asked questions

Is my file sent anywhere?

No. The conversion is performed entirely in your browser; the PDF never leaves your device and is not sent to any server.

Is the HTML text selectable?

Yes, as long as the PDF contains real text. A transparent text layer is overlaid on each page image to allow selection, copying and search.

Why does the text seem slightly offset when selected?

The visible rendering comes from the page image; the text layer is positioned approximately. Any offset only affects the selection area, not the appearance of the document.

Do scanned PDFs work?

The image of each page will be reproduced correctly, but no text can be selected: a scanned PDF contains no text, only an image. Optical character recognition (OCR) would be needed.

Are multi-page documents supported?

Yes. All pages are converted and gathered into a single HTML file, in the order of the original document.

Example request

curl -X POST https://cdrn.fr/api/v1/tools/pdf-to-html-converter/execute \
  -F "file=@/path/to/file"

Input schema

Field Type Required Default
file file

this tool expects a file - use Content-Type multipart/form-data instead of application/json

Endpoints

  • GET https://cdrn.fr/api/v1/tools - lists every available tool
  • GET https://cdrn.fr/api/v1/tools/pdf-to-html-converter - returns the schema for this tool
  • POST https://cdrn.fr/api/v1/tools/pdf-to-html-converter/execute - runs this tool with a JSON payload