Convert HTML to PDF

Paste HTML, get a PDF rendered by headless Chromium — the same engine your browser uses, so CSS, web fonts and page breaks survive the trip.

Free: 5 conversions a day from this page. A free API key raises it to 50 documents a month.

Nearly every HTML-to-PDF failure comes down to the rendering engine. Old libraries ship an ancient WebKit that never learned flexbox or grid, so a layout that is fine in a browser collapses in the PDF. This converter runs current Chromium, which is why what you see in the browser is what lands in the file.

Three details decide whether the output looks professional: print styles, page breaks and fonts. Use an @media print block for anything that should differ on paper, break-inside: avoid on rows and cards you do not want split, and web fonts loaded over https so they resolve during rendering.

For one-off conversions the box above is enough. For anything repeatable — invoices at checkout, reports on a schedule, exports triggered by a user — the same conversion is one POST request to the API.

Questions

Does my CSS work?

Yes. Rendering uses current headless Chromium, so flexbox, grid, custom properties and web fonts all behave as they do in the browser.

How do I control page breaks?

Use the standard CSS: break-before, break-after and break-inside: avoid. They are honoured because the renderer is a real browser.

Can I add headers and page numbers?

Yes, through the API, using header and footer templates with page-number placeholders.

Other converters: URL to PDF · API docs