HTML to PDF
Paste HTML and get a PDF with real text and links — or the exact look via your browser's print engine.
- Free
- No sign-up
- Runs in your browser
What is an HTML to PDF converter?
An HTML to PDF converter takes HTML code and produces a PDF document from it. With this tool you paste HTML into the editor or open an .html file, see a live preview beside it, and export a PDF. The preview runs in a sandboxed frame, so any scripts in the pasted code never run. New to it? Press "Try a sample" to load a short example document and see what is supported.
There are two ways to convert, because there are two different jobs. Create PDF builds a clean document layout with real, selectable text and clickable links. It understands the structure of your HTML: headings, paragraphs, lists, tables, quotes, code and images. Exact look (print → Save as PDF) hands the page to your browser's own print engine instead, so full CSS, web fonts and external images render exactly as designed.
This tool converts pasted HTML, not a live web address. Everything happens in your browser; the HTML you paste and the files you open are never uploaded to toolsbox.
How to convert HTML to PDF
- 1
Add your HTML
Paste HTML into the editor or click "Open .html file". The preview updates as you type. Use "Try a sample" to see what is supported.
- 2
Set a base URL if needed
If the HTML contains relative links such as /pricing or ../docs, enter the site's base URL so those links become absolute in the PDF.
- 3
Choose the page layout
Pick paper size, orientation, margins, font size and whether to add page numbers.
- 4
Create a clean PDF
Click "Create PDF" for a structured document with selectable text, clickable links and tables whose header row repeats across pages.
- 5
Or keep the exact design
Click "Exact look (print → Save as PDF)" when styling must match pixel for pixel. In the print dialog, choose "Save as PDF" as the printer and save.
What people convert with it
Email templates
Save a newsletter or transactional email as a PDF for sign-off or a design archive. Use Exact look when the template relies on CSS and external images.
Invoices and receipts
Many billing systems output HTML invoices. Paste the code and create a PDF to send or file, with totals in a table that splits cleanly across pages.
Documentation snippets
Turn a help article, API reference section or internal wiki page you copied as HTML into a readable PDF with code blocks and nested lists intact.
Exported notes
Note-taking and writing apps often export to HTML. Convert the export into a PDF that keeps headings, bold text, links and checklists.
Reports built in HTML
Developers and SEOs often generate simple HTML reports from scripts. Paste the output and get a page-numbered PDF for a client.
Create PDF or Exact look: which to use?
Create PDF supports headings, paragraphs, bold, italic, underline, strikethrough, inline code, links, nested bulleted and numbered lists, tables (the header row repeats on every page), blockquotes, code blocks, horizontal rules and line breaks. Images are included when they are embedded as data URIs or hosted on the same site. Most CSS is ignored, apart from text-align, colour, font weight, font style, font size and text direction, which keeps the output tidy whatever the source looks like.
External images are not fetched in this mode. Loading them would tell a third-party server that you are converting the document, so for privacy they are left out. If the images matter, embed them as data URIs or use Exact look.
Exact look renders everything your browser can: complex layouts, grid and flexbox, web fonts, backgrounds and external images. The trade-off is that the result depends on the browser's print settings, so check margins and "background graphics" in the print dialog. Use Create PDF for documents meant to be read and searched, and Exact look for anything where the visual design is the point.
Frequently asked questions
Is my HTML uploaded to a server?
No. Both conversion modes run entirely in your browser. The HTML you paste or open stays on your device and is never sent to toolsbox.
Can I convert a web page by its URL?
No. This tool converts HTML you paste or open as a file, not a live web address. To convert a page, save it or copy its HTML source first, then paste it here.
Will scripts in my HTML run?
No. The preview is shown in a sandboxed frame where scripts are blocked, so pasting unfamiliar HTML is safe. Content that only appears after JavaScript runs will not appear in the PDF.
Why are my images missing from the PDF?
Create PDF includes images embedded as data URIs or hosted on the same site, but does not fetch external images, for privacy. Embed the images or use the Exact look mode, which renders external images through the browser's print engine.
Why does my CSS styling not appear?
Create PDF deliberately ignores most CSS and keeps only text alignment, colour, font weight and style, font size and text direction. For full styling, web fonts and complex layouts, use Exact look and choose "Save as PDF" in the print dialog.
Are links clickable in the PDF?
Yes, in Create PDF links stay clickable. Add a base URL and relative links like /contact are turned into full addresses, so they still work outside the original site.
Related tools
More PDF tools →Merge PDF
Combine PDFs in any order, privately, right in your browser.
PDF · In-browser
Split PDF
Extract pages or split a PDF by ranges, every N pages or page by page — privately in your browser.
PDF · In-browser
Compress PDF
Shrink PDFs losslessly or aggressively (rasterized) — your choice, with before/after sizes.
PDF · In-browser
PDF to JPG
Turn PDF pages into JPG or PNG images at 72, 150 or 300 DPI — one by one or as a ZIP.
PDF · In-browser