This HTML to PDF converter turns a local HTML file or pasted HTML code into fixed PDF pages in your browser. It lets you choose paper size, orientation, margins, typography and background handling, then inspect page thumbnails and the actual PDF before downloading.
HTML is a layout source, not a finished paper document. A browser page can depend on scripts, remote stylesheets, loaded fonts, viewport width and interactive controls. A useful HTML to PDF workflow therefore needs clear boundaries: this page renders static markup that is available in the input, then shows you what the fixed pages look like.
How to convert HTML to PDF
- Upload an HTML file or paste HTML code. The file picker accepts
.html,.htmand.xhtmlfiles up to 5 MB. Direct input supports up to 500,000 HTML characters. - Check the source summary. The page reports visible characters, headings and links, and also counts images and tables when they are present.
- Review the prepared preview. Unsafe active elements are removed before the markup is rendered. The first six planned pages are shown as thumbnails when the browser can render them.
- Choose the page setup. Select A4, US Letter or US Legal, then choose Portrait or Landscape and a margin size.
- Adjust reading settings. Base font size, line spacing, rendering detail and background colors affect how the static page is captured.
- Set PDF metadata and the filename. PDF title changes the document metadata. Download filename controls the name saved by the browser.
- Convert and inspect. The result panel uses the generated PDF itself for the preview, reports page and source details, and provides one-click download.
Changing the source or output settings clears the previous result. This keeps the download tied to the controls currently visible on the page.
Choose a local file or paste HTML
Use a local file when you already have a saved document, email template, report, static export or simple page. You can drag one supported file into the upload area or choose it with the file picker. The original file is read in the browser; the tool does not edit it.
Pasting is useful for a short HTML email, a table copied from a template, a report fragment or a small document generated by another tool. A complete document is not required: a body fragment with headings, paragraphs, lists, tables and inline styles can be rendered too.
The current workflow is for local markup. HTML to PDF converter online free should not be interpreted as a public webpage crawler here: entering a URL is not supported, and the tool does not request a page from the internet. That distinction matters because a local HTML file and a live webpage can have different content, permissions and responsive layouts.
Set paper and layout
Paper size controls the physical PDF page. A4 is a practical default for general documents. US Letter is useful for documents intended for common US office workflows. US Legal gives a taller page for reference sheets and long forms.
Portrait is usually easier to read for prose, instructions and narrow tables. Choose HTML to PDF landscape when a table, dashboard or code-like layout is wider than a portrait page. Margins change the printable width: Narrow fits more content, Normal balances space and readability, and Wide gives the page more breathing room.
Base font size and line spacing apply to the conversion container. They are useful when the source has very small text or compressed paragraphs. Rendering detail changes the raster resolution used for the page image. Higher detail can improve small text but may create a larger PDF and use more browser memory.
Print background colors and fills is useful for callouts, table headers and colored sections. Turn it off when you want a simpler white page. Always inspect the thumbnails and final preview because a background that looks good on a screen can reduce contrast on paper.
What the renderer keeps
The renderer preserves common static structures such as headings, paragraphs, lists, blockquotes, code blocks, tables, links, inline styles and images that the browser can load into the render area. It applies a predictable page stylesheet so basic HTML fragments have readable spacing even when the source has little CSS.
Scripts, event-driven behavior, embedded frames, objects, forms and other active content are removed before rendering. External stylesheets are not fetched as a complete website theme. Remote images may fail to appear when the browser cannot load them with the required cross-origin permissions. These are boundaries of the current local browser workflow, not errors that the page should hide.
The generated PDF is a static visual document. It does not include a selectable text layer, clickable PDF link annotations, form fields, JavaScript, bookmarks, PDF/A settings, encryption or digital signatures. If you need a searchable accessible PDF or exact browser print behavior, use a publishing or browser-print workflow that supports those requirements.
Review the generated PDF
Use the planned thumbnails to catch obvious page-flow problems before conversion. Look for headings split from their following paragraph, tables that become too narrow, long links that wrap unexpectedly and images that are missing. If the first preview looks crowded, try Landscape, a smaller base font, Narrow margins or Standard rendering detail.
After conversion, the result panel displays the same PDF Blob that the download button uses. Check the page count, paper and orientation, source size, HTML word and character counts, and whether active content was removed. The report is a diagnostic summary; it cannot determine whether the original CSS expresses the right visual design.
Illustrative HTML to PDF examples
A static report
An illustrative report with a title, paragraphs, a two-column table and a callout can use A4 Portrait, Normal margins, 12 px text and Comfortable line spacing. Check that the table fits inside the printable width before downloading.
A wide data table
An illustrative table with many columns can use US Letter Landscape, Narrow margins and 10 or 11 px text. If cells still wrap too much, shorten visible labels in the source or split the table into sections. The tool does not automatically preserve a spreadsheet-style column model.
A styled HTML fragment
An illustrative fragment with inline colors and a heading can use Print background colors and fills. If its design depends on a remote CSS file, paste the necessary styles into a local <style> block and then inspect the result. This is a practical suggestion, not a guarantee that every CSS rule will rasterize identically.
Illustrative examples are not fixed outputs. Page count, wrapping, output size, image loading and font coverage depend on the source, browser and selected settings.
Scope, alternatives and honest limits
This page is a local HTML file to PDF converter. It sanitizes the supplied markup, creates a browser render area, captures fixed pages and assembles those page images into a PDF. It is useful when you need a quick visual snapshot of static HTML and want to review the result before download.
It is not a Chrome HTML to PDF converter integration, a Google HTML to PDF converter, a public URL crawler or a full browser automation service. Chrome's own print dialog can be a better fit when you need the browser's exact print CSS, selectable text, live page resources or system printer settings. A publishing pipeline can be a better fit when you need semantic, searchable or tagged PDF output.
The practical base97 difference is inspectability: the source remains visible, the tool shows structure counts, warns about removed active content, plans page thumbnails, previews the actual PDF and records the output settings. It does not claim to be the best HTML to PDF converter for every document type, and it does not promise to preserve formatting that depends on JavaScript, remote resources or unsupported CSS.
Troubleshooting HTML to PDF problems
The preview is blank or unavailable. Confirm that the HTML is not empty, try a smaller source and remove unsupported active elements. Very large DOM trees or remote assets can exceed browser rendering limits.
The layout is too wide. Choose Landscape, reduce the base font size or use Narrow margins. For tables, shorten long unbroken values and inspect each page rather than relying only on the first thumbnail.
Styles are missing. Put essential rules in an inline <style> block or inline attributes. External stylesheets are not imported as a complete webpage theme.
Images are missing. Check whether the image is local to the supplied file or can be loaded by the browser with cross-origin access. A remote URL alone does not guarantee that the browser can draw it into a canvas.
The result contains no working form or script. This is expected. Active content is removed so the PDF remains a static document. Use visible text or a separate publishing workflow when interaction is required.
Common questions
Can I use this as an HTML to PDF converter without watermark?
Yes. The current result does not add a base97 watermark. It still creates a static image-based PDF with the limits described above.
Does it preserve HTML formatting without losing formatting?
It attempts to preserve static structure and styles that can be rendered in the local browser. Exact preservation is not guaranteed for JavaScript layouts, remote CSS, unsupported CSS rules, web fonts or cross-origin images.
Can I convert MHTML or a complete saved webpage archive?
No. The input is limited to HTML, HTM and XHTML files or pasted HTML code. MHTML, URL fetching and complete archive resolution are outside the current scope.
Can I search or copy text from the downloaded PDF?
No. Pages are captured as images inside the PDF. Use a text-preserving publishing or browser-print workflow when selectable or searchable text is required.