From a snippet of HTML or some formatted text to a PDF file: no sign-up, no upload, no watermark.
Paste HTML with its style block, or type and paste formatted text.
Scripts are removedA4, Letter or Legal, portrait or landscape, a margin and a quality.
Live preview on the rightThe PDF is drawn on your device and downloads straight away.
Name it before you savehtml2canvas draws your HTML as a picture at the page's width, and jsPDF cuts that picture into pages.
Paste HTML mode takes a full page or a fragment. Rich text mode takes formatted text from a document.
The preview shows your HTML in a locked-down frame, so you can check it before converting.
Page size and margin set the width your HTML is drawn at, like a browser window that size.
Long content runs onto as many pages as it needs. Type a file name first if you like.
Four habits that make the PDF match what you expect.
A style block or inline styles travel with the code. Linked stylesheets may not load.
Images from other sites only draw if that site allows it. Data URIs always work.
A4 portrait with 20 mm margins is about 643 CSS pixels wide. Wide layouts get squeezed.
Pages are cut at fixed heights, so a line can split across two pages.
html2canvas reads the page's DOM and styles. It is not a full browser print engine.
Headings, paragraphs and lists, in the fonts your browser can show.
Backgrounds, borders, padding and most layout from your CSS.
Embedded images and same-site images. Others need the site to allow it.
Scripts, iframes and event handlers are removed before drawing.
The page is drawn as it looks on screen, so @media print and @page rules don't apply.
Each PDF page is a JPEG image, so its text can't be selected or searched.
One studio, very different documents.
Turn an invoice template into a PDF to email to a client.
Check how a snippet or email template looks on paper without setting up a server.
Paste formatted text from a document and save it as a PDF to share.
A good-looking PDF for people to read. For job portals that scan text, export a text PDF too.
Straight from the tool, so you know before you start.
What you can put in.
What you get back.
Things to know first.
PDF too large to email? Shrink it with Compress PDF.
Habits for when you make the same kind of PDF often.
Save your HTML in a file. Paste it, change the details, convert.
Type a name like invoice-042 in File name so downloads don't overwrite each other.
Put the logo in the HTML as a data URI so it always renders.
Write down the page size, margin and quality that look right for that template.
Both make a PDF from HTML. They work in very different ways.
| Feature | HTML to PDF studio | Browser Print to PDF |
|---|---|---|
| Works on pasted code | ✓ Yes | Open it as a page first |
| Scripts stripped | ✓ Always | Page runs as normal |
| Text in the PDF | ✗ Picture of text | ✓ Selectable text |
| Print CSS (@media print) | ✗ Not used | ✓ Used |
| Same look on every device | ✓ One fixed width | Depends on printer settings |
Small checks that save a second conversion.
If something looks wrong in the preview, it will look wrong in the PDF.
Switch to landscape for more width before you convert.
Pick Standard or Draft. High draws at 2x for the sharpest text.
The image site blocked it. Embed the logo as a data URI instead.
Add a little space above that block, or change the margin, and convert again.
Open the HTML in a browser tab and use Print, then Save as PDF.
Invoices and contracts are drawn on your device and never uploaded.
Going the other way? Try PDF to HTML.
Your HTML is laid out at the page's width minus the margins, about 643 pixels for A4 portrait with 20 mm margins. A layout that looks good in a phone-sized window will look good in the PDF.
Code gives you control. Rich text is quicker for copied documents.
Full control with your own style block, classes and layout. Best when the look matters.
When you have the code
Type or paste formatted text and keep its bold, lists and headings, with no code at all.
When you have a document
The same studio, six everyday jobs.
An HTML invoice template as a PDF.
A newsletter design saved for sign-off.
An HTML resume as a PDF to read and print.
Formatted notes as a file to share.
A snippet's printed look, in seconds.
Content on A4 or Letter for printing.
Need images in a PDF instead? Try JPG to PDF.
Quick answers about CSS, images, page sizes and privacy.
Reviews from people who used this tool.
Loading reviews…
Jump to a version of this tool already set up for a specific need.
Free, with no sign-up, just like this one.
Paste HTML with CSS or formatted text, check the live preview, and download a PDF in A4, Letter or Legal. It is made in your browser.
HTML or rich text · A4, Letter, Legal · margins and quality · live preview
Full HTML with a style block or inline CSS works. Images from other sites may not show.
Tools that pick up where this one leaves off.