HTML to PDF

AI tools often answer with HTML - a report, a resume, an invoice or a poster. Paste the code here, see exactly how it looks, and save it as a PDF in one click.

or

Free · No sign-up · Your files are processed on your device and never uploaded

How to use HTML to PDF

  1. Paste HTML code…
    1

    First

    Paste your HTML code, or choose an .html file.

  2. Make PDF
    2

    Then

    Press Show preview - the page appears exactly as a browser draws it, with its styles.

  3. PDFdocument.pdf
    3

    Finally

    Press Make PDF to download, or Print / Save as PDF for a PDF with selectable text.

Two ways to make the PDF

Styles and scripts in your HTML - including Tailwind CSS or Bootstrap from a CDN - work in the preview. The page runs in a closed sandbox, so it cannot reach this site or your data.

  • Make PDF - keeps the exact look of the page, colours and layout included, as an image PDF. Long pages are split over A4 pages.
  • Print / Save as PDF - opens your browser's print window; choose "Save as PDF". Text stays selectable and searchable.

Common uses

AI assistants are good at producing a styled resume, a one-page report, a certificate, an invoice layout or a poster as HTML code - but HTML is not something you can attach to an application or print easily. Developers have the same need when they want a PDF of an email template or a page design to share with a client. Paste the code here, check the preview, and save it as a PDF.

Choosing between the two PDF options

Make PDF captures the page exactly as you see it, colours and backgrounds included, which is best for posters, certificates and designs. The text is part of the image, so it cannot be selected. Print / Save as PDF gives real, selectable and searchable text, which suits resumes and reports that will be read by recruitment software or searched later. In the print window, turn on "Background graphics" if colours are missing.

Fixing layouts that break across pages

  • Give the page a fixed width, such as 800 pixels, so it matches the A4 shape.
  • Ask the AI to add page-break-inside: avoid to sections that should not be split.
  • Use web fonts from Google Fonts in the HTML; fonts installed only on another computer will be replaced.
  • Keep images inside the HTML or from sites that allow sharing, so they appear in the PDF.

Questions

Does it work with HTML from ChatGPT, Gemini or Claude?

Yes. Copy the whole code block - from <!DOCTYPE html> or <html> to the end - and paste it in. A short fragment without <html> also works and gets a clean default style.

Why do some images not appear in the PDF?

Pictures from other websites can be drawn only if those websites allow it. Use Print / Save as PDF in that case - the browser includes every image.

Is my code uploaded?

No. The preview and the PDF are made inside your browser.

Is the HTML run safely?

Yes. The preview runs in a closed sandbox, so the code cannot reach this site, your other tabs or your data.

More convert

All tools →