How to use HTML to PDF
- Add one or more .html files, or paste HTML code in the box.
- Choose the page size and orientation.
- Press Start: each page is laid out on our server.
- Download the PDF.
How HTML to PDF works
A print layout engine
The conversion uses WeasyPrint, an open-source engine made for turning HTML and CSS into printed pages. It splits content into pages, repeats table headers, honours CSS page breaks and @page rules, and embeds the fonts it uses, including Arabic, Chinese and Japanese fonts.
Safe by design
Your HTML is treated as untrusted: the server never runs JavaScript, never downloads images, stylesheets or fonts from other websites and never reads local files. Pictures written inside the page as data: URLs are kept.
Your CSS comes first
Styles in the page are applied on top of a clean default style. Leave the page size on “As set in the page” to keep the size from the page's own CSS, or choose one to replace it.
Tips for the best result
- Put pictures inside the HTML as data: URLs (base64) so they appear in the PDF.
- Use CSS like page-break-before: always to start sections on a new page.
- Pages built by JavaScript (React, Vue…) come out empty: save the rendered HTML first, or use your browser's Print → Save as PDF.
- For Markdown files, use Markdown to PDF instead.
- Add dir="rtl" on Arabic blocks for full control of direction.
Private by design
HTML to PDF needs software that cannot run inside a browser (LibreOffice or Ghostscript). Your file is sent over an encrypted HTTPS connection to our own server in Europe, converted in memory (RAM, never written to disk) and deleted as soon as the result is sent back to you, and in any case within 5 minutes. Nobody looks at your files, they are not kept and they are never shared.
Related tools
- Markdown to PDFConvert Markdown (.md) files or pasted Markdown into a tidy PDF with headings, tables, code blocks and right-to-left Arabic paragraphs.
- Markdown to HTML (and HTML to Markdown)Turn Markdown into a clean HTML page, or HTML back into Markdown, with tables, lists, links and code blocks.
- Create a PDF (Text to PDF)Write or paste text, add a title and get a clean PDF in seconds. Also turns .txt files into PDF. Arabic and mixed text supported.
- Compress PDFReduce the size of PDF files by re-compressing their images and fonts, with three compression levels.
- Merge PDFCombine several PDF files into one, in the order you choose, directly in your browser.
Frequently asked questions
Can I convert a web page by its address (URL)?
Not here. Fetching any address from our server could be abused to reach private networks, so only files and pasted code are accepted. Open the page in your browser and use Print → Save as PDF.
Why are my pictures missing?
Pictures linked from other websites or from your computer are not downloaded. Embed them in the HTML as data: URLs, or use the HTML-to-PDF feature of your browser.
Is JavaScript executed?
No. Only HTML and CSS are used, so content created by scripts will not appear.
Are flexbox and grid supported?
Flexbox and grid work for common layouts, but complex ones can differ from a browser. Tables, floats and normal blocks are the most reliable.
Does Arabic text work?
Yes. Arabic is shaped and joined correctly and Arabic fonts are embedded. Add dir="rtl" to the html tag or to Arabic blocks so lines are right-aligned.
Is my file uploaded?
Yes, this conversion needs desktop software that cannot run in a browser. The file is sent over an encrypted HTTPS connection to our own server, converted in memory and deleted as soon as the result is sent back; anything left over is erased within 5 minutes. Files are never stored, shared or looked at.
Is there a size limit?
Yes: 100 MB per file and up to 10 conversions per minute, so the free service stays fast for everyone.