Skip to main content

HTML to PDF

Convert clean HTML to PDF in your browser

Paste or import HTML, preview the sanitized result, and export a print-ready PDF. Scripts and unsafe embedded content are removed before preview and export. No uploads. No account. No tracking.

No uploadsNo accountNo trackingSanitized output
Your content is processed locally in your browser and is never uploaded to WebF1.

Convert sanitized HTML to a print-ready PDF in your browser.

Import HTML

Drag and drop a HTML file here, or

For safety, scripts and unsafe embedded content are removed before preview and PDF export. Remote images, fonts, and stylesheets are not loaded in the privacy-first browser-only version; use embedded data URLs or local content.

HTML editor and preview

0 chars~0 words0 lines

Export settings

Export

The PDF export opens your browser's print dialog. Choose "Save as PDF" as the destination. The default filename is document.pdf. Page size, orientation, margins, page numbers, and the optional title page are applied through the print document's CSS.

Converting clean HTML documents to PDF

This mode takes HTML you already have (an export, a snippet, or a hand-written page), sanitizes it, and prints it to PDF. It is designed for clean, document-style HTML, not full web applications.

What HTML features are supported

Why scripts and unsafe content are excluded

HTML from emails, exports, or third parties often contains scripts, iframes, event handlers, or remote resources. Running that content would create real security and privacy risks: scripts can execute arbitrary code, iframes can load untrusted pages, and remote resources can phone home. The tool removes all of these before preview and export so the PDF contains only document structure and inline text, not executable content.

Print-ready HTML guidance

See also the Markdown to HTML and Markdown to PDF converters, or read how it works.

Private by design

Your Markdown and HTML are rendered and converted entirely in your browser.Private Markdown Converter does not upload imported content, does not require an account, and does not use third-party tracking or advertising scripts. Read the full privacy page.

Frequently asked questions

What HTML features are supported?
Headings, paragraphs, lists, links, images (with safe URL schemes), tables, blockquotes, horizontal rules, and inline and block code. The goal is a clean, printable document, not a full browser rendering engine.
Why are scripts and unsafe content removed?
Pasted HTML is treated as untrusted. Scripts, event handlers, iframes, embedded objects, forms, and unsafe URL schemes are stripped before preview and export to prevent accidental execution or loading of remote content. This keeps the tool safe to use on untrusted input and avoids silent network requests.
Are remote images and stylesheets loaded?
No. The privacy-first, browser-only version intentionally does not fetch remote images, fonts, or stylesheets. Use embedded data URLs or local content. This avoids cross-origin requests and keeps content on your device.
How is the PDF generated?
The sanitized HTML is wrapped in a print-styled document and opened in a hidden frame. Your browser print dialog handles the final save. Choose Save as PDF as the destination.
Will the PDF match my complex CSS exactly?
No. The tool uses a single, embedded print stylesheet tuned for readability. Complex external styles, JavaScript-driven layouts, embedded applications, and remote assets are intentionally not supported in the privacy-first version.

Related tools