Guides

How to Save a Web Page or HTML Code as a PDF

By Devender Kumar, founder of VikiPDF. Updated November 16, 2026

If you have a page of HTML, such as a saved receipt, an email body or a small report you wrote yourself, you can turn it into a PDF without any software.

Steps

  1. Open HTML to PDF.
  2. Choose an HTML file, or paste your HTML into the box.
  3. Choose A4 or Letter and click Preview.
  4. Click Save as PDF. Your browser print window opens.
  5. In the print window, choose Save as PDF as the destination and save the file.

Things to know

  • Only the HTML you give is shown. Pictures that point to other websites may not load.
  • Scripts are blocked for your safety. Pages that build themselves with JavaScript can look empty.
  • The tool cannot fetch a web address for you. Paste the HTML instead.
  • The text in the PDF stays selectable, because the page is printed, not turned into a picture.

When to use something else

To save a normal web page you are looking at, use your browser: press Ctrl+P and choose Save as PDF. To save a photo as a PDF, use JPG to PDF.

Examples where this helps

  • Saving the text of an email or a confirmation as a PDF for your records.
  • Turning a small report you built in HTML into a file you can send.
  • Making a printable copy of a table you created with HTML.

If your HTML uses a style sheet from another site, copy the styles into a style tag inside your HTML first. This keeps the look the same in the PDF.

Common questions

Is my HTML uploaded?
No. It is shown and printed in your own browser.

Will CSS styles work?
Styles inside your HTML work. Styles loaded from other websites may not.