HTML to PDF
Turn HTML snippets, invoices, reports or saved .html pages into a clean, text-based PDF right in your browser.
HTML input & PDF layout
Limits
- Complex CSS layouts (Flexbox, CSS Grid, external <link> stylesheets, custom @font-face) and <script> tags are not supported by html-to-pdfmake; use “Print / Save via Browser” for full browser CSS rendering.
- Remote http(s) images in <img> tags are blocked for privacy and CORS reasons; embedded data:image/png or data:image/jpeg images work.
- CJK HTML downloads a self-hosted Noto Sans CJK font (~5.5–10.2 MB) once on first use; Arabic, Hebrew, Hindi and Thai are not supported in the direct PDF export (use Print / Save via Browser).
Preview & PDF download
Enter HTML on the left to preview and generate a PDF.
How to use HTML to PDF
- Enter or drop HTMLPaste HTML code into the editor or drop an .html / .htm file.
- Pick page settingsChoose A4, Letter or Legal, portrait or landscape, margins, font size and page numbers.
- Generate & downloadReview the preview and click Generate PDF to download.
Local HTML to PDF with CJK font support
Your HTML is sanitized locally (scripts, event handlers and external requests are stripped), converted to structured PDF definitions with html-to-pdfmake (MIT), and built into a selectable text PDF with pdfmake (MIT).
When Chinese, Japanese or Korean text is detected, the tool automatically loads and embeds the matching self-hosted Noto Sans CJK font; Latin-only documents stay fast with the bundled Roboto font.
Frequently asked questions
Are my HTML files or external URLs sent to a server?
No. Everything is parsed and converted inside your browser tab with zero uploads and no headless-browser server.
Why did some CSS styling look simpler in the PDF?
pdfmake supports inline styles, tables, headings, lists and colors, but not full CSS Grid/Flexbox. Click “Print / Save via Browser” if you want your browser’s full CSS engine.
Does it support Chinese, Japanese and Korean HTML?
Yes. CJK text automatically triggers our self-hosted Noto Sans CJK fonts.
Related tools
All toolsTXT to PDF Converter
Turn plain text or .txt files into a clean, paginated PDF.
PDF to HTML Converter
Convert PDF pages into a self-contained HTML file.
EPUB to PDF Converter
Turn DRM-free EPUB e-books into printable PDFs.
Document Converter
One place to convert EPUB, ODT, RTF, CSV, Excel and PDF files.