jellykit logojellykit

HTML to PDF (Sanitized)

Sanitize HTML markup locally with DOMPurify and export headings, lists, quotes, and tables into a clean multi-page PDF.

Loading HTML to PDF (Sanitized) in your browser — 100% client-side with zero uploads.

Related PDF tools

All PDF tools

PDF Studio

One tabbed workspace to organize, annotate, sign, watermark, and number a single PDF with undo/redo locally.

PDF

PDF Merge

Combine multiple PDF documents into a single file and reorder them easily.

PDF

PDF Split

Extract specific page ranges or split every PDF page into separate files.

PDF

PDF Rotate

Preview PDF pages and rotate individual pages or the entire document.

PDF

Images to PDF

Select, reorder, and compress PNG, JPEG, or WebP images into a clean, sized PDF document.

PDF

PDF to Images

Select and reorder PDF pages, adjust resolution and quality, and export as PNG, JPEG, WebP, or ZIP.

PDF

About HTML to PDF (Sanitized)

Convert HTML documents into clean, multi-page downloadable PDFs locally in your browser—with strict DOMPurify sanitization that strips scripts, iframes, inline styles, and event handlers before PDF generation.

How to use HTML to PDF (Sanitized)

  1. 1

    Paste HTML markup or load a local .html / .htm file into the source editor.

  2. 2

    Inspect the sanitized preview on the right and select A4 or US Letter page size with optional page numbers.

  3. 3

    Click Download PDF to lay out headings, paragraphs, lists, blockquotes, code blocks, and tables into a local PDF.

Frequently asked questions

What does DOMPurify remove before generating the PDF?

It removes <script>, <style>, <iframe>, <object>, <embed>, <form>, <svg>, javascript: URLs, and inline event handlers (like onclick/onerror) so untrusted HTML cannot execute code.

Will custom CSS layouts, web fonts, or remote images appear in the PDF?

No. To keep conversion fast, predictable, and 100% offline with no remote fetches, this tool converts semantic HTML structure (headings, text, lists, quotes, code, and tables) using standard PDF fonts.

Is my HTML document uploaded to a headless browser service?

No. Sanitization via DOMPurify and PDF generation via pdf-lib run strictly inside your browser tab.