HTML to PDF Converter
Convert HTML to a downloadable PDF online with live preview, paper sizes, orientation, margins, page breaks and page numbers. Your file is not stored.
Uses our server · What is sentFree · No sign-up · No daily limit
Something not working, or missing a feature? Send feedback
About the HTML to PDF Converter
The HTML to PDF Converter renders your HTML with a real browser engine and returns a PDF. Paste the code or open an .html file to convert HTML to PDF online. Choose the paper size, orientation and margins, add page numbers, and control page breaks with CSS.
Conversion happens in your browser, so your files and records stay private.
How to use the HTML to PDF Converter
- Paste HTML or open an .html file and check the live preview.
- Choose paper size, orientation, margins and page numbers.
- Click Download PDF.
Common mistakes
- Content split across pages. Tables and images can be cut at a page break. Add break-inside: avoid to rows, figures or cards that must stay together.
- Screen-only styles. The PDF uses print media, so styles inside @media screen do not apply. Use @media print, or no media query, for the PDF layout.
- Web fonts loading late. Fonts from a public URL are loaded before rendering, within a time limit. Very large font files may time out, so use WOFF2 and only the weights you need.
Works well with the HTML to PDF Converter
- HTML Viewer: preview and fix the HTML first.
- Markdown to HTML: write the document in Markdown and convert it.
- HTML Formatter: tidy messy HTML before converting it.
Frequently asked questions
How do I force a page break?
Use the CSS property break-before: page (or break-after: page) on the element that should start a new page.
Are external images and styles loaded?
Public https resources are loaded with size and time limits. Addresses on private networks are blocked for security.
How do I save an HTML file in PDF format?
Choose Open file and pick the .html file (or paste its code), check the preview, then click Download PDF. Without a converter, you can open the file in a browser, press Ctrl+P (Cmd+P on a Mac) and choose Save as PDF; this converter adds fixed paper sizes, margins and page numbers, and gives the same result in every browser.
Why does my PDF look different from the web page?
A PDF uses print rules: the page width becomes the paper width, and CSS inside @media print applies while @media screen rules may not. Background colours appear only with the Background colours switch on, and fixed or sticky elements often print differently. Set widths in % or mm, and add print styles for anything that should change on paper.
Why is the PDF generated on a server?
A browser cannot export a page to PDF without a print dialog, so the HTML is rendered by a headless browser on our server. Your HTML and the PDF are not stored.
Can I use CSS like flexbox and grid?
Yes. Rendering uses a current Chromium engine, so modern CSS works as it does in Chrome.
Guides and tutorials
- Web Development
How to View and Preview HTML Online: Snippets, Files and Email Templates
View HTML online: paste code to render a live preview, open an .html file, check an email template, and fix blank or unstyled previews. No upload or install.
· 4 min read
- Web Development
How to Preview HTML Code Online Safely: Sandboxed iframes Explained
Preview and render HTML code without risk: how sandboxed iframes, srcdoc and CSP isolate untrusted markup, why scripts stay off, and fixes for broken previews.
· 6 min read
Related tools
JSON to CSV
Convert JSON arrays to CSV online with automatic column detection, nested object flattening and custom delimiters. Open the result in Excel or Sheets.
CSV to JSON
Convert CSV to a JSON array online with header detection, type inference and delimiter auto-detection. Turn spreadsheet exports into data for APIs and code.
JSON to XML
Convert JSON to well-formed XML online with a configurable root element and attribute support. Validate the input and download the XML file.
XML to JSON
Convert XML to JSON online, keeping attributes and turning repeated elements into arrays. Malformed XML is reported with its location.
JSON to YAML
Convert JSON to clean, human-readable YAML online. Turn API responses and package files into config for Kubernetes, Docker Compose or CI pipelines.
YAML to JSON
Convert YAML documents to formatted JSON online with syntax validation. Errors are reported by line, so broken indentation is quick to find and fix.