HTML to PDF: Convert HTML Code or Files to PDF
Convert HTML to PDF: upload an .html file or paste HTML code and get a clean A4 PDF with your CSS applied. Converted on our server and deleted right after processing.
Most tools never upload your files
Convert HTML Code and Files to PDF
HTML to PDF turns an HTML file or a block of HTML code into a clean PDF document. It is the easy way to save invoices, reports, email templates and documentation that you build as HTML into a fixed file you can send, print or archive. The page is laid out by a real browser engine, so your CSS, tables and text in any language come out the way a browser would print them.
How to convert HTML to PDF
- Add your HTML. Drop an .html or .htm file onto the upload area, or paste your HTML code into the text box if you do not have a file.
- Check your images. Pictures must be embedded in the HTML as data URLs. Images, stylesheets and scripts that point to other servers are not loaded.
- Click Convert to PDF. The file is converted on our server, usually in a few seconds.
- Download the result. Save the PDF, named after your HTML file, and open it in any PDF reader.
What the converter keeps
- Your CSS: styles in style blocks and style attributes are applied, including colors and backgrounds, so the PDF matches your design.
- Clean pages: pages are A4 with 15 mm margins and no browser header or footer lines. Add your own @page rule to change the paper size or margins.
- Headings as bookmarks: the headings in your HTML become a clickable outline in the PDF, which makes long documents easy to navigate.
- Every language: Arabic, Hindi, Chinese, Cyrillic and other scripts are supported, because the page is drawn by a full browser engine with Unicode fonts.
What is left out, and why
- Web links: links to websites are removed for security, so they are not clickable in the PDF. Add them afterwards with Add Links to PDF.
- Scripts: JavaScript does not run, so content that a script builds in the browser will not appear. Save the finished page as HTML first.
- Live web addresses: the tool converts files and code, not URLs. To save a website, use your browser's Print option and choose Save as PDF.
Practical uses
- Invoices and receipts generated as HTML by your shop, booking system or billing tool.
- Email templates and newsletters you want to archive or send to a client for approval.
- Documentation and reports written in HTML or exported from a notes app.
- Developer previews: paste a snippet to see how it prints before you add print styles to your site.
Tips for a clean result
- Use print friendly CSS: avoid fixed heights, and add break-before: page to sections that should start on a new page.
- Turn images into data URLs with any image encoder before converting, or they will be left out.
- If large embedded images make the PDF too big, run it through Compress PDF.
- Need numbered pages? Add them afterwards with Add Page Numbers to PDF.
Privacy and processing
The conversion runs on WoowPDF's own server with a headless browser that has no network access, so your HTML cannot load anything from the internet while it is being printed. Your file is sent over an encrypted connection, converted in a temporary folder and deleted right after the PDF is created. Files can be up to 100 MB each. The tool is free, needs no account, adds no watermark and works in any modern browser on Windows, macOS, Linux, Android and iOS.
Features
- URL conversion
- HTML code input
- CSS support
- Preserve styling
Frequently asked questions
How do I convert HTML code to PDF?
Paste your HTML code into the text box, or upload an .html or .htm file, then click Convert to PDF. You download a PDF in a few seconds.
Can I convert a web page by entering its URL?
Not with this tool: it converts HTML files and pasted code. To turn a live web page into a PDF, use URL to PDF, which takes the web address.
Are CSS styles kept?
Yes. Styles in style blocks and style attributes are applied by a real browser engine, so the PDF looks like the page does when printed. External stylesheet files are not loaded, so put your CSS inside the HTML.
Why are some images missing?
For safety the converter never loads files from other servers. Embed images as data URLs inside the HTML and they appear in the PDF.
Will links be clickable in the PDF?
Links to websites are removed during conversion for security reasons. Add clickable links afterwards with Add Links to PDF.
Is my file safe?
The file is sent over an encrypted connection to our server, converted in a temporary folder and deleted right after processing. Each file can be up to 100 MB.