# Convert HTML to PDF

> Paste markup or open an HTML file, set page size, margins, and headers/footers, and the browser's own layout engine renders a PDF 1.7. Headings H1-H3 become the outline sidebar. No headless Chrome service in the loop, so internal pages and credentials never leave the tab.


Live tool: https://lofttools.com/tools/pdf-tools/html-to-pdf

Category: PDF & Documents

## How it works

1. **Enter HTML** — Paste your HTML code or open an HTML file
2. **Preview** — Preview the rendered output before conversion
3. **Download** — Download your PDF file instantly

## FAQ

### Are CSS styles preserved?

Yes. Inline and embedded CSS styles are rendered in the output PDF.

### Does this preserve bookmarks and form fields?

The output is a new PDF generated from your HTML. Bookmarks come from H1–H3 headings; there are no form fields unless your HTML included them.

### What PDF versions are supported?

The output is generated as PDF 1.7. There is no input PDF version to consider.

## Tips

- **Rendered locally from your markup** — HTML is parsed and laid out in your browser; the output is generated as PDF 1.7. Nothing is sent to a headless Chrome service, so internal pages and credentials stay private.
- **Bookmarks come from H1-H3 headings** — The PDF outline is built from your heading structure, so a well-marked-up document gets a usable sidebar in any PDF reader with no extra configuration.
- **Inline and embedded CSS render** — Styles in style blocks and style attributes apply. External stylesheets only work if reachable from the browser, so prefer inline CSS for predictable output.

## Privacy — what we do not do

This tool runs entirely in the browser via WebAssembly. Your file never reaches a Loft Tools server. Specifically:

- **No upload.** The file bytes load into the browser tab's memory and process on your own CPU. Open DevTools → Network and observe zero outbound requests carrying file data while Convert HTML to PDF runs.
- **No AI training on your file.** Loft does not train models. We could not train on a file we cannot see.
- **No content scanning.** No virus, copyright, or content-moderation pass against your file. The bytes are not accessible to us.
- **No server-side log of file contents, filenames, or EXIF metadata.** Cloudflare edge captures URL and truncated IP for abuse defense (standard CDN behaviour). Cloudflare Web Analytics records anonymous page hits, no cookies, no PII. Nothing about your file content reaches any log.
- **No retention.** Close the tab and the file leaves browser memory. No backups exist on our side because no copy ever existed on our side.
- **No account.** No email, no signup, no auth, no telemetry tied to you.
- **Offline-capable after first visit** (PWA). Once you've loaded a tool, it caches; later sessions work without internet. For high-sensitivity files, run the tool once online to warm the cache, then disconnect before processing.

Compare with upload-based services: each transmits your file to a processing server. Even over HTTPS, each has logs, retention windows, and subpoena exposure. Loft has none of these because the server architecture does not include your file.

## More

- All tools: https://lofttools.com/tools
- Category: https://lofttools.com/tools/pdf-tools
- LLM index: https://lofttools.com/llms.txt
