Free tool · Convert
HTML to PDF
Convert HTML code or a web snippet into a PDF.
Paste any HTML snippet - including inline CSS - and have it rendered by your browser's own layout engine, then saved as a PDF via the print dialog. Because your browser does the rendering, the output looks exactly as it would in a web page. Useful for archiving web content, generating styled reports from HTML templates, or converting email-style layouts to PDF.
- Files never leave your device
- Runs entirely in your browser
- Free, no account needed
How to use HTML to PDF
Two steps, and nothing to install.
Paste your HTML
Paste the markup, keeping CSS inline or in a style block and embedding images as data URIs so nothing needs to be fetched.
Print to PDF
Review the rendered preview, then use the print dialog and choose Save as PDF. Set page size and margins with an @page rule or in the dialog.
More free tools
Free, private, and no sign-up on any of them.
How this works in your browser
There is no separate HTML-to-PDF engine here, and that is deliberate. Your markup is rendered by the browser's own layout engine, the same one that draws every web page you look at, and then handed to its print pipeline where Save as PDF writes the file. Reusing the browser means the output matches exactly what the markup produces on screen, including CSS layout, web fonts and print-specific rules like @page. A bundled third-party converter would ship its own partial CSS implementation and diverge in exactly the ways that are hardest to debug. The trade-off is that pagination follows print rules rather than anything you control directly, which is why the CSS page-break properties matter.
HTML to PDF vs. upload-based online tools
| Feature | HTML to PDF (in-browser) | Upload-based online tools |
|---|---|---|
| File upload required | No - never leaves your device | Yes - file is sent to a server |
| Processing queue | None - starts instantly | Often, especially at peak times |
| Watermark on output | Never | Common on free plans |
| Usage limits | None - free, unlimited use | Often capped per day or file size |
| Works offline once loaded | Yes, for most tools | No - requires a live connection |
| Account required | No | Often, for anything beyond a trial |
Common ways to use HTML to PDF
Generating a styled report
Turn an HTML template with real CSS into a PDF without wiring up a server-side rendering service.
Archiving web content
Save a snippet of a page as a fixed document that will look the same regardless of what happens to the original.
Producing an invoice or receipt
Render a markup-based template to PDF for sending on, keeping the text selectable.
Frequently asked questions
What it can and cannot do, and what happens to your files.
Does it support CSS and JavaScript?
Inline CSS and `<style>` blocks are fully supported. External stylesheets and JavaScript may not load due to browser security policies - inline everything for best results.
How do I control the page size and margins?
Set `@page { size: A4; margin: 20mm; }` in your CSS, or adjust margin settings in the browser print dialog that opens.
Can I convert a live website URL instead of pasting HTML?
This tool works with pasted HTML. For a live URL, open the page in your browser and use its built-in Print → Save as PDF option.
Why do my external stylesheets and images not load?
Browser security stops a page from pulling in arbitrary external resources in this context, so anything referenced by URL may be missing. Inline your CSS in a style block and embed images as data URIs and the render becomes completely predictable.
Where do page breaks fall?
The browser decides, based on your content and page size. Use the CSS properties for it, such as page-break-before or break-inside: avoid, to keep a table or section from splitting across pages.
Is the resulting text selectable?
Yes. Because the browser lays out real text and then prints it, the output contains genuine text rather than an image of the page, so it stays selectable and searchable.
Is my HTML sent anywhere?
No. It is rendered by your own browser and printed locally, so nothing is transmitted.
Render your HTML as a PDF - uses your browser, zero upload.
Files never leave your device. No upload, no account, and free for unlimited use.