FileSlim logo - compress images and PDFs online free
FileSlim

HTML to PDF or PNG — Free, No Upload

How it works — 100% in your browser, no upload
Quick answer: paste self-contained HTML with inline styles, set the page size, then export to PDF or PNG. Rendering uses an SVG foreignObject on a local canvas, so no markup is ever sent anywhere.

How to convert HTML to PDF

  1. Paste your HTML. Use inline styles so the markup is self-contained.
  2. Set the canvas. 794 × 1123 px matches A4 at 96 DPI.
  3. Pick a scale. 2× gives crisp text on retina screens and in print.
  4. Export. Download as PDF or PNG.

Frequently asked questions

Why do my external images not appear?

The renderer deliberately blocks network requests so nothing leaves your browser. Use data-URI images or inline SVG instead.

Which page size should I use?

794 × 1123 px is A4 at 96 DPI and 816 × 1056 px is US Letter. Fit your content within one canvas.

Does the PDF contain selectable text?

No. The markup is rasterised, so the PDF holds an image of your layout. Use it for invoices, certificates and receipts rather than long-form text.

Related tools

Need smaller files? Use the FileSlim compressor or browse all free tools.

Last Updated: