HTML to PDF
Convert HTML to PDF online, free and private.
Turn HTML and CSS into a PDF right in your browser. Paste your code, choose A4, US Letter or one long page, pick portrait or landscape and a margin, then click Create PDF. Teasoft renders your page the way a browser shows it, with your styles, web fonts and images, and saves it as a PDF of up to 500 pages. Your HTML is converted on your device and never uploaded. The tool is free, with no sign-up and no watermark.
No Sign-Up, No Watermark
A4, US Letter, One Long Page
HTML Never Leaves Your Browser
Portrait or Landscape
Private by design: your HTML is processed in your browser and never uploaded. Protected by Cloudflare Turnstile.
How Do You Convert HTML to PDF Online?
To convert HTML to PDF online, paste your HTML and CSS into the editor, choose a page size, orientation and margin, and click Create PDF. Then click Download to save the PDF. It takes a few seconds and works on any device, with nothing to install.
Invoices, reports, email templates and resumes are often built in HTML, but people expect to receive a PDF. Printing from a browser adds headers, footers and page addresses, and the result changes from one browser to another. Teasoft gives you a consistent PDF of exactly what your HTML shows, ready to share, print or archive.
Everything happens on your own device. DOMPurify first cleans your HTML and removes scripts, iframes, forms and embedded objects. Your page is then laid out in a hidden frame at the width of the PDF page, html2canvas captures it page by page in high resolution, and pdf-lib assembles the pages into one PDF. Your code is not sent to Teasoft or anyone else, so you can safely convert invoices, internal reports and client documents.
What ends up in your PDF:
| Part of your HTML | In your PDF | Good to know |
|---|---|---|
| Layout and CSS | Kept as the browser shows it | Styles in <style> tags, inline styles and linked public stylesheets are applied, including flexbox, grid, colors and backgrounds. |
| Text and fonts | Rendered sharply as part of the page | Text becomes part of the page image, so it cannot be selected, searched or edited in the PDF. |
| Images | Included | Images from other websites only appear if their server allows it. Base64 data: images always work. |
| Links | Shown, not clickable | Links keep their look but cannot be clicked in the PDF. |
| Scripts and forms | Removed | JavaScript, iframes, forms and embeds are stripped for safety, so content created by scripts will not appear. |
| File name | html-document.pdf | Rename the file after downloading if you need to. |
Common reasons to convert HTML to PDF:
- Saving invoices, receipts and quotes built in HTML as PDFs to send to clients.
- Turning HTML email templates and newsletters into PDFs for review or approval.
- Exporting reports, tables and dashboards written in HTML for printing or archiving.
- Creating a PDF resume, certificate or letter from an HTML and CSS template.
- Sharing documentation, code examples or class notes as a file anyone can open.
- Checking how a print layout looks on A4 or US Letter before you send it.
What each control does:
| Control | What it does | When to use it |
|---|---|---|
| HTML & CSS box | Holds the code you want to convert | Paste a full page or a snippet. Put your CSS in a <style> tag. |
| Sample | Loads an example document | Try the tool before pasting your own code. |
| Clear | Empties the editor | Start again with different HTML. |
| Page size | A4, US Letter or One long page (no page breaks) | Use One long page for web pages and receipts you do not want split. |
| Orientation | Portrait or Landscape | Choose Landscape for wide tables and dashboards. |
| Margin | No margin, Small margin or Big margin | Small adds about 10 mm and Big about 20 mm around your content. |
| Create PDF | Converts your HTML into a PDF | Click after choosing your settings. |
| Download | Saves html-document.pdf to your device | Click once the PDF is ready. |
Good to know
- Text is saved as an image. The PDF looks exactly like your page, but text cannot be selected, searched or copied.
- Scripts do not run. JavaScript is removed, so charts or content added by scripts will not appear. Paste the final rendered HTML instead.
- External images need permission. Images from other websites show only if their server allows it. Use your own images or data: URLs.
- Pages are cut at a fixed height. CSS page-break rules are not used, so choose One long page if nothing should be split.
- Up to 500 pages. Longer documents are stopped to keep your browser responsive.
What You Can Do With This Tool
- Convert HTML to PDF for free. No software to install and no account to create.
- Paste HTML and CSS directly. Use a full page or just a snippet.
- Keep your design. Fonts, colors, backgrounds, flexbox and grid look the way your browser shows them.
- Choose A4 or US Letter. Get standard pages that are ready to print.
- Create one long page. Save a web page or receipt without page breaks.
- Switch to landscape. Fit wide tables, charts and dashboards on the page.
- Set the margin. Pick no margin, a small margin or a big margin.
- Include images. Use images from your own site or embed them as data: URLs.
- Try a sample first. Load an example document with one click.
- Convert long documents. Create PDFs of up to 500 pages.
- Keep your code private. Everything is converted in your browser and nothing is uploaded.
- Convert on any device. Works on Windows, Mac, Linux, Android and iPhone.
Which PDF Tool Should I Use?
Use HTML to PDF when your content is written in HTML and CSS and you need it as a PDF. If you are starting from a different kind of file, or need to shrink, combine, sign or secure the PDF you create, these tools pick up where HTML to PDF leaves off.
How to Convert HTML to PDF (3 Steps)
Paste your HTML
Paste your HTML and CSS into the HTML & CSS box, or press Sample to load an example document. Keep your styles in a style tag. Scripts are removed automatically.
Choose page size, orientation and margin
Pick A4, US Letter or One long page, choose Portrait or Landscape, and select No margin, Small margin or Big margin. Then click Create PDF.
Download your PDF
Click Download to save html-document.pdf. A quick security check may run the first time you convert, but your HTML always stays in your browser.
Tip: if images from another website do not show up in your PDF, upload them to your own site or embed them as data: URLs, then convert again. If the finished PDF is too large to email, run it through Compress PDF.
Which Page Settings Should I Use?
| What you are converting | What to choose | What you get |
|---|---|---|
| An invoice, letter or resume | A4 or US Letter, Portrait, Small margin | A standard, print-ready document |
| A wide table, chart or dashboard | Landscape | More width, so columns are not squeezed |
| A web page, receipt or long article | One long page | A single page with no breaks through text or images |
| A design that already has its own spacing | No margin | Your layout edge to edge, exactly as designed |
| A document that will be printed and bound | Big margin | Extra white space around the content |
| A document for readers in the US or Canada | US Letter | Pages sized 8.5 × 11 inches |
Getting better results when you convert HTML to PDF
- Keep CSS inside the HTML. Use a <style> tag or a link to a public stylesheet, not a file on your computer.
- Use full image addresses. Relative paths such as images/logo.png cannot be found. Use full https:// links or data: URLs.
- Design for the page width. Content is laid out at about 720 px wide on A4 portrait. Wider layouts are scaled down, which makes text smaller.
- Paste the final HTML. If a page builds its content with JavaScript, copy the rendered HTML from your browser's developer tools.
- Check before you send. Open the downloaded PDF and scroll through every page to confirm nothing is cut off or missing.
After you convert your HTML to PDF
- Make it smaller. Use Compress PDF before you email or upload the file.
- Combine it. Use Merge PDF to join it with other documents.
- Sign it. Use Sign PDF to add your signature to an invoice, contract or letter.
- Protect it. Use Protect PDF to add a password before you share it.
Frequently Asked Questions
How do I convert HTML to PDF online?
Paste your HTML and CSS, choose a page size, orientation and margin, and click Create PDF. Then click Download to save the PDF. It usually takes only a few seconds.
Is Teasoft's HTML to PDF converter free?
Yes. It is completely free, with no sign-up, no account and no watermark on your PDF.
Is my HTML uploaded to a server?
No. Your HTML is converted inside your browser and never leaves your device. Only a short security check is sent to Teasoft to block automated abuse, never your code.
Do I need any software or browser extension?
No. Everything runs in your web browser. There is nothing to download or install, and you do not need Adobe Acrobat or a PDF printer.
Is CSS supported?
Yes. Style tags, inline styles and linked public stylesheets are applied, including flexbox, grid, web fonts, colors and backgrounds. A few advanced effects, such as some filters and blend modes, may look slightly different.
Can I convert HTML that uses JavaScript?
Scripts are removed before conversion for safety, so content that JavaScript adds will not appear. Copy the final HTML from your browser's developer tools and paste that instead.
Will the text in my PDF be selectable?
No. Each page is captured as a high-resolution image, so the PDF looks exactly like your HTML, but text cannot be selected, searched or copied and links are not clickable.
Why are some images missing from my PDF?
Images from other websites only appear if their server allows cross-origin loading. Host the images on your own site or embed them as data: URLs, then convert again.
What page sizes can I choose?
A4, US Letter, or One long page with no page breaks. Each can be portrait or landscape.
How do I stop content being split across pages?
Choose One long page. On A4 and US Letter, pages are cut at a fixed height and CSS page-break rules are not used. Very tall documents, over about 200 inches, are split into pages automatically.
Can I change the margins?
Yes. Choose No margin, Small margin (about 10 mm) or Big margin (about 20 mm).
Can I convert a website URL to PDF?
Not directly. This tool converts HTML code that you paste. To convert a live page, copy its HTML from your browser's developer tools, make sure image links are full https:// addresses, and paste it into the editor.
Can I convert HTML to PDF on my phone?
Yes. It works in Chrome and Safari on Android and iPhone. Paste your HTML, choose your settings and download the PDF.
How long can my document be?
Up to 500 pages per PDF. Long or image-heavy pages take more time and memory, especially on phones.
What is my PDF called?
Your file is saved as html-document.pdf. You can rename it after downloading.
Can I convert several HTML files at once?
No. The tool converts one document at a time. Convert each one, then use Merge PDF to combine them into a single file.
Does it work on Windows, Mac and Linux?
Yes. It works in Chrome, Edge, Firefox and Safari on any desktop or laptop, with nothing to install.
What should I do after converting my HTML to PDF?
Open the PDF and check every page. Then use Compress PDF to make it smaller, Merge PDF to combine it with other files, or Protect PDF to add a password before you share it.
About Teasoft's HTML to PDF Tool
Teasoft's HTML to PDF is a free, browser-based converter that turns HTML and CSS into a PDF. You can choose A4, US Letter or one long page, portrait or landscape, and three margin sizes, then download a PDF of up to 500 pages without uploading anything.
It is made for developers, designers, students, small businesses and anyone who builds invoices, reports, email templates or resumes in HTML and needs a PDF to share, print or archive.
Your HTML is processed on your own device using DOMPurify, html2canvas and pdf-lib, three open-source libraries, so your code is never uploaded, stored or seen by anyone else.