HTML to PDF

3 conversions left today  [Upgrade →]

Paste raw HTML with inline CSS or upload a complete ZIP bundle containing your HTML template, external stylesheets, JavaScript, custom fonts, and images. Our sandboxed headless Chromium engine renders your layout with pixel accuracy and generates high-resolution PDFs.

How to Use HTML to PDF

  1. 1

    Option 1 (Direct HTML): Paste or type your HTML markup directly into the editor panel. Use inline CSS or embedded <style> tags.

  2. 2

    Option 2 (Multi-file ZIP Bundle): Compress your HTML template together with its CSS, images, JavaScript, and fonts into a .zip file and drop it into the upload box.

  3. 3

    Automatic Detection: For ZIP files, our secure engine inspects the archive and automatically identifies your main index.html file, resolving all relative asset paths.

  4. 4

    Choose Settings: Select your target page format (A4, Letter, or Legal) from the options panel.

  5. 5

    Convert & Download: Click "Convert to PDF". The sandboxed worker renders the complete document and delivers a pixel-perfect PDF instantly.

Features

  • ✓ Raw HTML & inline CSS editor with live preview
  • ✓ Full ZIP archive upload (HTML + CSS + JS + Images + Fonts)
  • ✓ Automatic entry point detection (index.html or root HTML)
  • ✓ High-DPI headless Chromium rendering with @page & print CSS support
  • ✓ Sandboxed security against path traversal and zip bombs
  • ✓ A4, Letter, and Legal page dimensions with custom layout controls

Frequently Asked Questions

How do ZIP file uploads work?

You can compress an entire web page or template folder into a .zip archive (containing index.html, style.css, image files like PNG/SVG/JPG, and custom fonts). Our engine securely unzips the assets in an isolated sandbox, serves the local assets, and prints the finished page to PDF.

What file structure should my ZIP bundle have?

Ensure your primary HTML file is named index.html (or placed at the root of the ZIP). All asset links in your HTML should use relative paths, such as <link rel="stylesheet" href="style.css"> or <img src="assets/logo.png">.

Are external CSS, JavaScript, and Google Fonts supported?

Yes! Client-side JavaScript, flexbox, CSS grid, external @import Google Fonts, and embedded canvas/charts are fully supported. The rendering engine waits for all assets to finish loading before capturing the PDF.

How do I control page breaks in my PDF?

Add CSS print rules like "page-break-after: always;" or "break-inside: avoid;" to your HTML elements. You can also specify exact page margins with "@page { size: A4; margin: 15mm; }".

Is my uploaded ZIP data safe?

Yes. Every uploaded ZIP file is validated against path traversal (Zip Slip), checked for zip-bomb compression limits (max 100MB uncompressed, 300 files), and rendered in a secure, isolated sandbox. All files are wiped immediately upon job completion.