Search DevTools

Jump to any tool or page

HTML to PDF Converter

Convert raw HTML content into a downloadable PDF file instantly. Useful for reports, templates, and exporting documents.

Export

Opens a print-ready window with a Save as PDF button and perfect CSS rendering.

Saves a print-optimized HTML file you can open offline and print to PDF with Ctrl+P.

Rasterises your HTML in the browser and downloads the finished PDF directly.

HTML

paste your HTML

Preview

Paste some HTML and the preview appears here.

Data Transformation

About HTML to PDF Converter

Render HTML or a live URL into a paginated PDF using a headless browser, with control over page size, margins, and orientation. The mental shift that matters is from continuous scroll to fixed pages: once content is paginated, CSS you never think about on screen — page-break rules, print media queries, absolute positioning — starts determining where content is sliced.

Frequently asked questions

Why does my PDF look different from the page in my browser?
Rendering uses the print media type, so any @media print block applies and any @media screen block does not. Sites commonly hide navigation, drop background images, or force black-on-white in print styles without realising it, and browsers additionally omit background colours unless print-color-adjust: exact is set. Viewport-relative units also behave differently, because the viewport is now a fixed paper box rather than a window. Testing with your browser's own print preview reproduces most discrepancies before you generate anything.
How do I stop tables and cards being cut across a page break?
Use break-inside: avoid on the element you want kept whole, with the legacy page-break-inside: avoid alongside it for older engines. For tables, repeating headers on each page requires the rows to sit in a real thead element — a header styled to look like one in tbody will not repeat. Note that break-inside: avoid is a request, not a guarantee: if the block is taller than the printable area, the engine must break it anyway, so oversized elements still get sliced.
Why are my images, fonts, or charts missing from the output?
Almost always a timing or reachability problem. The renderer captures at a point in time, so assets still loading, web fonts not yet swapped in, or charts drawn by JavaScript after an async fetch may not have appeared yet. Relative URLs are the other frequent cause: they resolve against the document base, so pasted HTML fragments referencing /assets/logo.png find nothing. Inlining critical CSS and embedding small images as data URIs removes both failure modes at once.
Is the text in the PDF selectable, and does that affect file size?
Yes — a headless browser emits real text runs with embedded font subsets, so the output is searchable and copyable rather than a picture of a page. That is why it differs from a screenshot-to-PDF pipeline, which produces a raster image with no text layer at all. Font subsetting keeps size reasonable by embedding only the glyphs actually used, though a page using several weights of a large family will still carry noticeable overhead per face.
What should I be careful about when converting a URL rather than pasted HTML?
Conversion happens server-side, so the fetch comes from the server and not from your session. Pages behind a login therefore render as the logged-out view, or as a sign-in screen. Any content requiring cookies, headers, or an authenticated session will be missing. Lazy-loaded content below the fold is another common gap, since nothing scrolls the page to trigger the intersection observers. For authenticated or heavily interactive pages, save the rendered HTML yourself and convert that.