# HTML to PDF

> Convert pasted HTML or an .html file into a PDF that looks the same. Runs entirely in your browser — nothing is uploaded.

Source: https://toffeekit.com/tools/html-to-pdf

**Category:** [PDF](https://toffeekit.com/category/pdf) · **Price:** Free · **Runs:** in your browser, nothing is uploaded

Open the tool: https://toffeekit.com/tools/html-to-pdf

**Also useful for:** html to pdf, convert html, web page to pdf, html file to pdf, email to pdf

## How it works

1. Paste HTML into the box, or click Open file to load an .html file. Click Example to try it.
2. Check the live Preview, which is shown at the real width of the page.
3. Pick a Mode, Page size, Orientation and Margins. Exact look keeps your CSS; Text document rebuilds plain text.
4. Click Create PDF, or Print or save with the browser for its own print to PDF.

## FAQ

### How do I convert an HTML file to PDF?

Open the .html file or paste its code, check the preview, then click Create PDF. Pages break between lines of text, so lines aren't cut in half.

### Can I convert a web page URL?

Not by address, since this tool doesn't fetch anything from the web. Save the page as HTML, or copy its source, and paste that in.

### Why are my images missing?

Linked images and stylesheets aren't loaded, because nothing is downloaded. Embed images as data URIs and put CSS inside a <style> tag, and they'll appear.

### What's the difference between Exact look and Text document?

Exact look draws the page exactly as the preview shows it, with a hidden text layer for search. Text document rebuilds headings, lists, tables and links as real PDF text with simple styling.

### How do I control page breaks?

Add style="break-before: page" to an element to start a new page there, or break-inside: avoid to keep a block together. Otherwise pages break at the nearest gap between lines.

### Is HTML to PDF free and private?

Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so your files are processed on your device and never uploaded. It works on phones and computers alike.

## Privacy

HTML to PDF runs entirely in your browser. Your files and text are processed on your device and are never uploaded.

## Related tools

- [Merge PDF](https://toffeekit.com/tools/merge-pdf) — Combine several PDFs into one, in any order.
- [Split PDF](https://toffeekit.com/tools/split-pdf) — Split by every page, every N pages or custom ranges.
- [Organize PDF](https://toffeekit.com/tools/organize-pdf) — Drag to reorder, rotate and remove pages.
- [Extract Pages](https://toffeekit.com/tools/extract-pdf-pages) — Pull selected pages into a new PDF.
- [Delete Pages](https://toffeekit.com/tools/delete-pdf-pages) — Remove pages you don't need.
- [Rotate PDF](https://toffeekit.com/tools/rotate-pdf) — Rotate all pages or just the ones you pick.

