Free HTML to PDF Tool for n8n

Paste simple HTML, click Generate, and download a PDF. It runs in your browser, so nothing you paste is uploaded. When it works for you, copy the same code into an n8n Code node. No API key, no community node and no paid PDF service.

Your PDF will appear here after you click Generate PDF.

Supported: headings (h1 to h3), paragraphs, bullet and numbered lists, line breaks, preformatted text, horizontal rules and common HTML entities. A4 pages, automatic page breaks. Not supported: CSS, images, tables, clickable links, inline bold or italic, non-Latin text (it prints as ?).

Use it in n8n

Option 1: copy the Code node

  1. Add a Code node (JavaScript, Run Once for All Items).
  2. Click the button below and paste the code into the node.
  3. Feed it items with an html field and an optional filename. The PDF comes out as binary property data.

Option 2: import the tested workflow

Five nodes that build two sample PDFs, read them back with Extract From File and check the text. Import it into a new, blank workflow and run it.

Tested in n8n Cloud on 26 October 2026 with a manual run: both sample PDFs were read back and every expected phrase was found. Not tested: very large inputs, emoji, and HTML from real email clients. Try it with your own HTML before you rely on it.

Questions

Does my HTML leave my computer?

No. The tool runs in your browser. The page does not send what you paste to any server.

Can n8n Cloud make a PDF from HTML without an external service?

Yes, for simple HTML. The Code node on this page builds the PDF file itself, so it needs no module, API key or paid service. It does not render CSS or images like a browser would.

Why is my styled web page not matching?

This tool reads the text and basic structure only. For a pixel-perfect copy of a web page, use a browser-based PDF service.

Is it free?

Yes. The code is MIT licensed. n8n has its own terms.

Scroll to Top