Convert HTML to PDF Online, Free
Make a PDF from HTML or plain text you paste or upload
HTML to PDF takes HTML markup or plain text and produces a PDF. You can paste the source into the box, or choose an .html, .htm or .txt file. The content is drawn in a locked frame, so scripts and forms do not run, and the result is saved as PDF page images. It suits invoices, notes and simple pages that you want to share as a fixed document.
When to use it
- An invoice or receipt that you have written as a simple HTML template.
- Notes, a log or a plain-text file that you want to share as a PDF.
- A simple HTML page that you want to keep as a document.
For a page that depends on scripts or interactive parts, the browser's own print dialog, with Save as PDF, is the better choice.
How to make a PDF from HTML or text
- Press Open HTML to PDF above.
- Either paste HTML or text into the box, or press Choose files and pick an .html, .htm or .txt file. A file is loaded into the box so you can read and edit it before converting.
- Choose the page size: A4 or US Letter.
- Press Create PDF. The status line shows “Rendering…”.
- Download the file. It is always named html-to-pdf.pdf, so rename it if you need a different name.
The box keeps what you typed while you stay on the page, so you can use another tool and come back. The text is cleared when the page is reloaded.
How the input is read
- If the input contains common HTML tags, such as html, body, div, p, h1 to h6, table, ul, ol, span, br, img, a or style, it is rendered as HTML. Inline style rules apply.
- If it has none of those tags, it is treated as plain text. Plain text is shown in a monospace font, with its line breaks kept.
- Scripts, forms and pop-up windows are blocked.
- Files over 5 MB are not accepted.
Page layout
- The content is laid out at a fixed width of 794 pixels, about the width of an A4 page on screen, with a margin around it. It is not scaled to the paper size you choose.
- A table wider than that width is not shrunk. Set table widths so they fit, for example a width of 100%.
- Pages are cut at fixed heights, not at the end of a paragraph. A line or a table row can therefore be split across two pages. If that happens, shorten the content or split it into separate documents.
- Long content produces several pages automatically. The result message gives the number of pages.
What the PDF contains
- The text is part of a picture on each page. It cannot be selected, copied or searched, and the tool says so under the input box.
- Background colours and text colours from your HTML are drawn into the picture, so they appear in the PDF.
Common problems and fixes
- “Paste some HTML or text first.” The box is empty. Paste the content or choose a file.
- A picture is missing. Pictures are loaded by the browser from their address. An image on another website that cannot be loaded will not appear. Check the page in a browser first.
- The file is rejected. Only .html, .htm and .txt files can be loaded, and files over 5 MB are refused. The message can appear even for a valid file that is too large, so check its size.
When another tool is better
- A Word document: use Word to PDF.
- A spreadsheet: use Excel to PDF.
- A PDF that you need to change afterwards: use Edit PDF.
Questions and answers
Does it run JavaScript?
No. Scripts, forms and pop-up windows are blocked. Only the HTML and CSS of the content is drawn.
Can I select the text in the PDF?
No. The text is part of the page picture, so it cannot be selected, copied or searched.
Why is an image missing?
Images are loaded by the browser from their address. If an address cannot be loaded, or the image is on a site that does not allow it, the image does not appear.
Why is a line split across two pages?
Pages are cut at fixed heights, and the tool does not check where paragraphs end. Shorten the content or split it into separate documents to move the break.
Privacy
The HTML or text you paste is read and drawn in your browser. This tool does not upload it to a FirePDF server. Pictures that your HTML links to on other websites are fetched by your browser when the page is drawn, the same as when you open that page yourself. Read the Privacy Policy and the Security page for details.
You may also need
See all FirePDF tools · ← Back to Home
