PDF Tools

HTML to PDF Converter

Convert HTML markup into a PDF document. Paste code or open a file, check the live preview, choose your page setup and export a PDF with real, selectable text.

  • Runs in your browser
  • No sign-up
  • Free to use
Preview

How to use HTML to PDF

  1. Paste your HTML into the editor, or select Open file to load an .html document.
  2. Check the preview on the right and adjust page size, orientation and margins.
  3. Select Download PDF for a quick text-based PDF.
  4. For complex CSS layouts or non-Latin text, choose Print / Save as PDF and pick “Save as PDF” in the print dialog.

HTML to PDF features

Live, safe preview

The markup is rendered as you type in an isolated frame where scripts cannot run.

Selectable text output

Headings, paragraphs, lists, tables and links become real PDF text rather than a screenshot.

Page setup

A4, Letter, Legal, A3 or A5 in portrait or landscape with four margin presets.

Two export engines

A fast built-in generator, plus the browser print engine for pixel-accurate CSS.

Inline images supported

Images referenced by https URL or embedded as data URIs are included.

Nothing uploaded

Your HTML is converted in the browser, which is safe for templates containing customer data.

When to use HTML to PDF

  • Turning an HTML email template or receipt into a PDF attachment.
  • Exporting a report generated as HTML by a script.
  • Producing a printable version of documentation or a simple web page.
  • Checking how an invoice template paginates before wiring up a server-side generator.

HTML to PDF FAQ

Which CSS is supported?

Download PDF supports common inline styles and basic rules: font size, weight, colour, alignment, margins, backgrounds, borders and tables. Flexbox, grid, floats and web fonts are not supported by that engine. Print / Save as PDF uses your browser's own renderer and supports all CSS.

Why are my external stylesheets not applied?

For safety the preview does not load remote stylesheets or scripts. Put your CSS in a <style> block or inline style attributes.

Does JavaScript in my HTML run?

No. Scripts are removed before preview and conversion. If your page builds its content with JavaScript, save the rendered HTML from your browser first.

Can I convert a web page by URL?

This tool converts HTML that you provide. To capture a live site, open it in your browser and use Print → Save as PDF, or use the Website Screenshot tool for an image.

Why do some characters come out blank in Download PDF?

The built-in generator embeds a font covering Latin, Cyrillic and Greek. For Arabic, Bengali, Hindi, Chinese, Japanese and similar scripts, use Print / Save as PDF, which uses the fonts installed on your device.

Two ways to turn HTML into a PDF

HTML describes a document that flows to fit any screen; a PDF has fixed pages. Converting between them means laying the content out at a specific page size and deciding where it breaks. There are two practical ways to do that in a browser.

The first is to translate the HTML structure into PDF drawing instructions directly. This is fast, produces compact files with real text, and behaves the same on every device, but it only understands a subset of CSS. It is ideal for document-style content: text, headings, lists, tables and images.

The second is to let the browser print the page to PDF. Because the browser lays out the content exactly as it would on screen, every CSS feature and font works. Use the @page rule and properties such as break-before and break-inside in your stylesheet to control pagination when you take this route.

Other useful tools