Files tool

HTML to PDF Converter

Paste a simple HTML document, preview the cleaned result and choose Save as PDF in your browser’s print dialog.

Runs in your browser. No upload.

Your file is processed locally and is not uploaded.

HTML content is limited to 250,000 characters. Website URLs are not fetched.

For safety, scripts, styles, images, links, forms and external content are removed. This tool prints simple text and tables; it does not convert a website URL.

The browser creates the PDF. Paper size, margins and headers are set in the print dialog.

Enter content, then preview it or open your browser’s print dialog.

About this tool

HTML to PDF Converter made simple.

This tool accepts HTML you provide; it does not fetch or convert website URLs. Processing stays in your browser. To prevent scripts and remote content from running, it removes scripts, styles, images, links, forms and embedded content. The browser’s print dialog creates the PDF, so page size, margins, headers and final output depend on your browser settings. Complex layouts may change. Keep a copy of your source.

Guide

Using HTML to PDF Converter

The HTML to PDF Converter cleans a piece of HTML you paste, shows a preview, and then opens your browser's print dialog so you can choose Save as PDF. It keeps simple text and tables. It does not fetch a web address, and it removes scripts, styles, images, links and forms before anything is shown or printed.

How to use it

  1. Type an optional document title, then paste your HTML into the content box. The box takes up to 250,000 characters.
  2. Press Preview document to see the cleaned result in a frame. Check that the headings, paragraphs and tables look right.
  3. Press Print / Save as PDF. A new tab opens with the cleaned page and the print dialog. Choose Save as PDF as the destination and set the paper size and margins there.

Worked examples

A heading and a short paragraph

You enter
Title
Receipt
Html
<h1>Receipt 12</h1><p>Paid in full.</p>
You get
Preview
A large heading Receipt 12 with the line Paid in full. beneath it

Headings and paragraphs are on the list of allowed tags, so both pass through. The title only names the tab and the saved file in the browser.

Not run through the tool. Treat it as an illustration.

A small table

You enter
Html
<table><tr><th>Item</th><th>Price</th></tr><tr><td>Tea</td><td>3.50</td></tr></table>
You get
Preview
A two-column table with a header row and one data row

Tables, rows, header cells and data cells are allowed, as are the colspan, rowspan and scope attributes. Other attributes, such as class or style, are dropped.

Not run through the tool. Treat it as an illustration.

Script and image are stripped

You enter
Html
<p>Hello</p><script>alert(1)</script><img src="photo.jpg">
You get
Preview
Only the paragraph Hello

Scripts and images are not on the allowed list, so they are removed, and nothing runs or loads from outside. Page layout tags such as div and span are not allowed either: they are dropped and their text is kept.

Not run through the tool. Treat it as an illustration.

A web address pasted by mistake

You enter
Html
https://example.com/report
You get
Preview
The address printed as plain text, not the page behind it

The tool never visits an address. Text that is not HTML is treated as text, so you get those characters on paper. To save a live page, use the print option of the browser on that page.

Not run through the tool. Treat it as an illustration.

When it helps

  • Turn a small block of notes or a table written in HTML into a PDF without installing software.
  • Check what a snippet of generated HTML looks like once all scripts and external content are removed.
  • Make a plain printable copy of a short report, a price list or a receipt.

Limits to keep in mind

  • Only a short list of tags survives: headings, paragraphs, lists, tables, quotes, code blocks and basic emphasis. Styles, images, links, forms and embedded content are removed, so rich layouts will change.
  • The browser makes the PDF, not the tool. Paper size, margins, headers and footers come from the print dialog, and a pop-up blocker can stop the print tab from opening.
  • The preview and the printed tab use their own simple styling, so table borders and alignment can differ a little between the two. Keep your original HTML as the master copy.

Tips

  • Write the page with p, h1 to h6, ul, ol and table, which all survive, instead of div and span, which do not.
  • Use the preview before printing, then check page breaks in the print dialog, since long tables can split across pages.
  • If the print tab does not appear, allow pop-ups for the site and press the button again.

Sources

Common questions

About HTML to PDF Converter.

Can I convert a website by typing its address?

No. The tool only reads HTML that you paste. It does not visit addresses, so it cannot copy a live page, its styles or its pictures. Use the browser's own print function on that page instead.

Why are my styles and images missing?

For safety the tool removes style blocks, inline styles, images, links, forms and scripts. Only simple text structure and tables are kept. This stops hidden code from running when the page is shown or printed.

Is my HTML uploaded to a server?

No. The HTML is cleaned and previewed in your browser and the PDF is created by your own print dialog. The page loads its cleaning script from the site's own files, so the first use needs a connection.

How do I get an actual PDF file?

Press Print / Save as PDF, and in the print dialog that opens choose Save as PDF (or Microsoft Print to PDF on some systems) as the printer. The file is then saved by the browser, not by this tool.

What happens if nothing is left after cleaning?

You see a message that no printable text or tables remain. This happens when the pasted HTML holds only unsupported parts, such as a lone image or script. An empty box gives a different message asking for content.

How long can the HTML be?

The content box accepts up to 250,000 characters. The document title is limited to 120 characters. Very long files may be slow in the preview, so split big documents into parts.

How do I convert HTML to PDF here?

Paste a simple HTML document, preview the cleaned result, then open the browser print dialog and choose Save as PDF. Page size and margins come from the browser.

Can I enter a website URL or preserve its styling and images?

No. This tool only processes HTML you paste. For safety it removes styles, scripts, images, links, forms and external content. Complex layouts may change.

Is my HTML uploaded?

No. The HTML is sanitized and previewed locally; your browser print dialog creates the PDF. Nothing is sent to a conversion server.