Page options
HTML
Drop the HTML file, along with any images or CSS it uses
Preview
Your PDF preview appears here as you type.

Save as PDF opens the print window. Set the destination to Save as PDF and turn off Headers and footers.

Paste HTML or open an .html file and you'll see it laid out on real pages, with dashed lines where each page will break. Pick the page size, orientation, and margins, then save it as a PDF through your browser's print window. The PDF keeps real, selectable text and sharp vector graphics, and dark backgrounds print exactly as they look on screen. Your HTML is rendered in your browser and never uploaded.

How to convert HTML to PDF

  1. Paste your HTML into the left pane, or click Open file. If the page uses local images or a CSS file, select them along with the .html file (or drop them all at once) so they're included.
  2. Choose a page size, orientation, and margins. The preview updates as you type and shows roughly where each page ends.
  3. Read any notes under the panes, such as images that didn't load or content wider than the page.
  4. Click Save as PDF. In the print window, set the destination to Save as PDF, turn off Headers and footers, and save.

Options explained

OptionWhat it does
Page and OrientationSets the PDF page to Letter, Legal, Tabloid, A3, A4, or A5, in portrait or landscape. The preview uses the same width the printer will.
MarginsThe blank border on every page. Choose None for full-bleed designs and dark backgrounds that should reach the edge.
File nameBecomes the PDF's title and the suggested name in the save window. It fills in from the page's <title> or the file name.
Print backgroundsKeeps background colors and images. Browsers drop them when printing unless they're told not to.
Shrink wide pages to fitScales down layouts built for a wide screen so nothing gets cut off at the right edge.
Avoid splitting images and rowsMoves images, table rows, code blocks, and figures to the next page instead of cutting them in half, and keeps headings with the text after them.
Page numbersAdds "page / total" in the bottom-right corner. Needs a Normal or Wide margin, and works in Chrome and Edge.
Readable base stylesGives bare HTML clean typography, bordered tables, and images that fit the page. It's applied before your CSS, so your own styles still win.
Run scriptsRuns the page's JavaScript, for charts and pages built by code. Scripts run in an isolated frame that can't reach the rest of this page.

Why print instead of a PDF library?

Most online HTML to PDF tools either upload your file to a server or take a screenshot of the page and wrap it in a PDF. Screenshot PDFs are blurry when zoomed, can't be searched, and don't let you copy text. Printing uses the browser's own layout engine, the same one that rendered the preview, so the PDF has real text, crisp lines, working fonts, and a small file size. It also handles CSS print features like @page, break-before, and @media print rules your HTML already contains.

Tips for a clean PDF

Control page breaks

Add style="break-before: page" to any element to start it on a new page, or break-inside: avoid to keep a block together. The dashed lines in the preview are estimates, so the final breaks can shift slightly when the browser applies these rules.

Make images show up

Images with full https:// links load on their own. Images with relative paths like images/logo.png need the image file opened together with the HTML. Images embedded as data URIs always work.

Full-page dark backgrounds

Set Margins to None and leave Print backgrounds on. With a margin, the printer leaves a white border around each page, because margins sit outside the page's background.

Remove the date and URL from the PDF

Those come from the browser's Headers and footers setting, which is in the print window under More settings. Turning it off removes the date, title, and address from the top and bottom of each page.

Frequently asked questions

Is my HTML uploaded to a server?

No. The HTML is rendered in your browser and the PDF is created by your browser's print feature. Nothing is sent anywhere, so it's safe for invoices, contracts, and internal reports.

Can I select and search the text in the PDF?

Yes. Because the PDF is printed rather than screenshotted, text stays as real text. You can search it, copy it, and the file stays small.

Why are background colors missing from my PDF?

Browsers skip backgrounds when printing to save ink. Make sure Print backgrounds is on. In Firefox and Safari, also tick Print backgrounds in the print window's settings.

Why are my images missing?

Images with relative paths only work if you open the image files together with the HTML file. Select them all in the Open file window or drop them at the same time. The notes under the panes list any images that didn't load.

Why is the right side of my page cut off?

The layout is wider than the page. Turn on Shrink wide pages to fit, switch to landscape, or choose a larger page size like Tabloid or A3.

How do I add page numbers?

Turn on Page numbers and use a Normal or Wide margin. Numbers appear in the bottom-right corner in Chrome and Edge. Other browsers skip them but still print the page.

Does it work with Bootstrap, Tailwind, and web fonts?

Yes. Stylesheets and fonts linked from a CDN load in the preview and print the same way. Local CSS files work too when you open them along with the HTML.

Can I convert a website URL to PDF?

This tool converts HTML you paste or open. To save a live website, open it in your browser and use Print, then Save as PDF, or save the page as HTML first and open that file here.

Our Full Dev Tool Library

Flipper File