HTML to PDF

Runs in browser PDF Conversion

Drop .html files or paste markup. The content is sanitised (no scripts run), then headings, paragraphs, bold and italic, lists, tables, code, quotes, links and data-URL images are typeset into a searchable PDF with Arabic and Hindi support. CSS layouts, web fonts and remote images are not fetched or rendered, so the result is faithful to the content rather than pixel-perfect — the page says so.

Privacy: Processed locally in your browser. Your file is not uploaded.
Loading tool…

What happens when HTML, Markdown, CSV or plain text is converted to PDF?

The source is laid out onto fixed pages: text is wrapped and split at page boundaries, HTML and Markdown are rendered with the fonts available to the converter, and a CSV becomes a table that may need landscape pages or smaller type to fit its columns. The result is a real PDF with a text layer — selectable, searchable, with embedded fonts — but a static one: links survive, scripts and interactivity do not, and right-to-left text needs a converter that shapes Arabic correctly.

How to use HTML to PDF

  1. Drop .html files, or paste HTML into the box.
  2. Choose paper size and other options.
  3. Click "Convert to PDF".
  4. Download the PDF(s).

HTML to PDF features

  • Drop or choose .html files, or paste markup
  • Headings, paragraphs, bold/italic, links, lists, tables, code and quotes
  • Embedded (data URL) images placed; remote images counted, never fetched
  • Sanitised with DOMPurify — no scripts, frames or form controls
  • Embedded fonts for Arabic, Hindi and Latin
  • Paper size, orientation, margins and page numbers
  • Nothing uploaded

HTML to PDF example

An exported blog post

Input:

post.html — 2,000 words, three images embedded as data URLs, one table

Output:

post.pdf — 5 pages, headings and table typeset, images in place, title from the <title> tag

Frequently asked questions about HTML to PDF

Can I convert a live web page by URL?

No. Nothing is fetched from the network — that is what keeps the tool private. Save the page from your browser (Ctrl+S, "Web page, complete" or "HTML only") and drop the file, or paste the markup.

Why does my layout look different?

Stylesheets, flex and grid layouts, positioning and web fonts are not rendered; the converter typesets the document’s content structure. Article-style pages, documentation, invoices and reports convert well; designed landing pages do not.

Are images included?

Images embedded in the HTML as data: URLs are placed in the PDF. Images referenced by URL are left out and counted in the notes, because no network request is made.

Is the HTML safe to paste?

The markup is sanitised with DOMPurify before it is read, so scripts, frames, form controls and event handlers are removed and never run.

Is my PDF uploaded to a server?

No. The file is opened and processed by your browser with WebAssembly and JavaScript; nothing is sent to Mutqan Soft or anyone else. Close the tab and the file is gone. Downloading the result needs a free account — no subscription, no payment.

Technical notes

DOMPurify (html profile, style/class/id attributes stripped) → DOMParser → an element walker that maps block elements to the layout block model and inline elements to styled runs, flattening nested layout containers. Tables read thead/tbody/tr/td with colspan expansion; lists keep nesting depth up to four levels. The layout engine typesets in the document worker.

References