Convert

HTML to PDF

Paste HTML and convert it to a styled PDF. Inline CSS supported.

Turn HTML markup into a presentable PDF

Developers often need to ship an HTML snippet — an invoice template, a scraped article, an AI-generated report, an emailed receipt — as a PDF. This tool renders your HTML through the browser's own layout engine and exports the result as a multi-page PDF, with styles preserved and text still selectable.

What works well

  • HTML with inline style="" attributes or <style> blocks
  • Basic typography: headings, paragraphs, lists, blockquotes, tables
  • Colours, borders, padding, margins — anything CSS can render on a page
  • Embedded base64 images inside <img> tags

Things to watch out for

External stylesheets (<link rel="stylesheet">) aren't fetched — inline everything or use <style>. External image URLs may load or fail depending on CORS. Web fonts from Google Fonts usually don't embed; fall back to system fonts like Arial or Georgia if the output needs to look identical everywhere.

How to use this tool

  1. Paste your HTML.
  2. Click Create PDF.

Frequently asked questions

Does external CSS work?

Only inline styles and embedded <code>&lt;style&gt;</code> tags. External stylesheets aren&apos;t fetched — paste the CSS into a <code>&lt;style&gt;</code> block in your HTML.

Will JavaScript run?

No — scripts are stripped for security. If your output depends on JS, render it first and paste the finished DOM.

Are @media print styles respected?

Yes — the renderer uses the print stylesheet when one is defined. Useful for hiding navigation, showing URLs, and setting page-break rules.

How does pagination work?

Content is sliced into A4-sized pages with natural page breaks at the nearest paragraph. Use <code>page-break-before</code> CSS to force breaks at specific elements.

Is my HTML private?

Yes — everything renders in your browser. Nothing is uploaded, logged, or stored.

Related tools