Read
Your HTML is parsed in the browser. Scripts, styles, forms and, if you choose, menus and footers are left out.
DocumentsFree HTML converter
Turn HTML code, a saved web page or content copied from a site into a PDF you can send or print. It's made in your browser, so your HTML is never uploaded.
Highlights
This converter reads your HTML and saves it as a PDF, ready to send, attach or print. Paste HTML code, open a saved .html file, or copy part of any web page and paste it in.
The PDF is made inside this browser tab. Your HTML is never uploaded, so it's safe for private pages and internal reports.
An example page is already loaded, so you can try Step 2 straight away. In Step 1: Add HTML, clear it and paste your own HTML, open an .html file, or copy part of a web page. In Step 2: Download, choose the paper size, then download the PDF or print it with your page's styles.
Paste HTML code or content copied from a web page, open an .html file, or use the example.
or drop a file here. It stays on this device.
.html, .htm or .xhtml · up to 10 MB
2,167 characters · 57 lines
In the PDF
The content of your PDF will appear here.
Choose the paper size and what to include, then download the PDF or print it with your page's own styles.
There's no text to put in the PDF yet.
Download PDF uses the content shown in the preview, not your page's CSS. To keep colours, fonts and layout, use Print with page styles and choose Save as PDF as the printer.
HTML to PDF guide
HTML is made for browsers, and it's awkward to send, file or print as it is. A PDF looks the same on every device. This tool gives you two ways to get one: a clean document of your content, or your page exactly as styled.
The basics
Download PDF doesn't take a screenshot. It reads the structure of your HTML and lays it out as real PDF text, which gives sharp printing, small files and text you can select.
Your HTML is parsed in the browser. Scripts, styles, forms and, if you choose, menus and footers are left out.
Headings, paragraphs, lists, tables, code, quotes, links and images are picked out.
The content is typeset with margins, page numbers and page breaks that keep headings with their text.
The finished PDF is saved by your browser. Nothing is uploaded.
What carries over
How each part of your HTML is set by Download PDF.
| HTML | In the PDF | Good to know |
|---|---|---|
| <h1> to <h6> | Six-step type scale | Kept with the next paragraph so they never end a page. |
| <p>, <strong>, <em> | 10.5 pt body text | Bold, italic, strikethrough and inline code are kept. |
| <ul>, <ol> | Bullets and numbers | Nested levels indent. Checkbox lists show ticked or empty boxes. |
| <table> | Ruled table | Shaded header that repeats on each page. Rows never split. |
| <pre>, <code> | Shaded monospace block | Indentation is exact. Blocks up to 40 lines are kept on one page. |
| <blockquote> | Ruled, muted quote | A thin left rule with italic text. |
| <a href> | Clickable link | Links to web addresses stay clickable. |
| <img> | Embedded PNG/JPEG | Scaled to fit the page width. Needs a full https:// address. |
Use cases
Whenever someone needs a fixed copy rather than a web page.
Send a client or manager a PDF proof of a newsletter or transactional email.
Turn an HTML report or export from another tool into a document you can attach.
Keep a clean, readable copy of an article or help page for offline reading.
Save HTML invoices and receipts with their layout using Print with page styles.
Turn a docs page or README rendered as HTML into a handout.
Keep a copy of a page as it was, in a format that won't change.
Set expectations
It works on the HTML you give it, without a server or a full browser engine behind it.
Download PDF uses its own print styling, not yours. Print with page styles keeps your CSS.
Scripts don't run, so content a script adds after the page loads won't appear.
It can't fetch a page by its address, and relative image or stylesheet paths can't be found.
Chinese, Japanese, Korean, Arabic, Hebrew and emoji aren't in the downloaded PDF's font yet.
Want to edit the content first? Convert it with HTML to Markdown, change it, then use Markdown to PDF.
Common questions
Quick answers about turning HTML into PDF files.
Paste your HTML code into Step 1, open a saved .html file, or copy part of a web page and paste it in. Check the preview, then in Step 2 choose A4 or US Letter and press Download PDF. The file is saved straight to your downloads folder.
No. The PDF is made inside your browser tab, so your HTML stays on your device. If your HTML links to images on other websites, your browser downloads those images to place them in the PDF, just as it would to show them.
Download PDF keeps your content (headings, paragraphs, lists, tables, code, links and images) and sets it as a clean document with its own print styling. It doesn't use your page's CSS, so colours, fonts, columns and backgrounds aren't carried over. To keep them, use Print with page styles.
Press Print with page styles. Your HTML opens in your browser's print dialog with its own CSS. Choose Save as PDF (or Microsoft Print to PDF on Windows) as the printer and save. Turn on Background graphics in the dialog's settings if your page uses background colours. Styles in a separate .css file that the page links to are only used if the browser can reach that file, so paste the CSS into a <style> tag for the most reliable result.
No. Scripts are ignored by both options, for your safety. Content that a script would have added to the page, such as a chart or a list loaded from a server, won't appear. Save the page from your browser after it has loaded and paste that HTML instead.
Images need a full web address (https://…) to be found, because pasted HTML has no website around it, so an address like img/photo.png points nowhere. Download PDF can include PNG and JPEG images; other formats, and images on sites that don't allow other pages to use them, appear as a link with the image's alt text.
Not directly. Open the page, press Ctrl+S (Cmd+S on a Mac) to save it as an .html file, then open that file in Step 1. Or select the part of the page you want, copy it and paste it into Step 1.
Yes. With Download PDF, the PDF contains real text, not a picture of the page, so you can search it, select and copy from it, and links stay clickable. Most browsers' Save as PDF keeps text selectable too.
Choose A4 (210 × 297 mm) or US Letter (8.5 × 11 in). The tool picks the usual size for your region to start with. Pages have 2 cm (about 0.8 in) margins. Downloaded PDFs longer than one page get page numbers. When printing with page styles, any @page rules in your own CSS take priority.
The font in downloaded PDFs covers Latin, Greek and Cyrillic alphabets. Chinese, Japanese, Korean, Arabic, Hebrew, Indic scripts and most emoji aren't included yet. Print with page styles uses your computer's fonts, so it handles them.
Make as many PDFs as you like, with no sign-up. HTML files can be up to 10 MB, and documents of a few hundred pages are fine. Very long pages take a few seconds to build.
Related converters
These tools also run in your browser, with no sign-up and nothing uploaded.