PDF guide · 2 min read · Updated September 27, 2026

How to Convert HTML to PDF

Turn HTML and CSS into a multi-page PDF in your browser with a live preview, learn how page breaks work, and see which styles convert most reliably to PDF.

When HTML to PDF is useful

HTML is a convenient way to produce formatted documents: invoices and receipts generated by an app, email templates, reports exported from a dashboard, or a quick document written by hand. Converting that HTML to PDF gives you a fixed file you can attach, print or archive.

How to convert HTML to PDF

HTML to PDF runs entirely in your browser, so your markup is not sent to a server.

  1. Open HTML to PDF.
  2. Paste your HTML into the editor, or open an .html, .htm or .txt file. You can also add .css files.
  3. Check the live preview next to the editor and adjust the markup until it looks right.
  4. Choose Download PDF to create an A4, multi-page document.

Styling that works well

The converter supports inline styles, style blocks and uploaded CSS files. Styles are scoped to the document, so they cannot affect the rest of the page. A few habits make the PDF look the way you expect.

  • Design for a fixed width. The PDF page is A4, so layouts that depend on a wide browser window may wrap differently.
  • Use a white or light background; dark full-page backgrounds use a lot of ink when printed.
  • Use full https:// URLs for images so they can load in the preview.
  • Avoid elements wider than the page, such as very wide tables, which can be cut off at the edge.

How page breaks work

Long content is split across pages automatically. The converter looks for a gap between lines of content near the bottom of each page, so it avoids cutting a line of text in half. Keep tables and images reasonably short, since one taller than a page has to be split.

Pages are rendered as high-resolution images of your content. That keeps fonts, colors and layout faithful to the preview, but it means text in the PDF cannot be selected, searched or copied. Scripts in the markup are removed for safety and are not run.

Alternatives for specific needs

If you need selectable, searchable text and your content is mostly headings, paragraphs, lists and tables, write it in Markdown and use Markdown to PDF, which generates real text. To add a formatted page to an existing PDF instead of creating a new one, use Insert Content.

Frequently asked questions

Can I convert a website URL to PDF?

The tool converts HTML markup rather than fetching a URL. Save the page as HTML or copy its source, then paste it into the editor.

Is my HTML uploaded when I convert it?

No. HTML to PDF renders and converts the document in your browser.

Why can't I select text in the PDF?

Each page is rendered as an image of your HTML to keep the styling exact. Use Markdown to PDF when you need selectable text.