pdfmdtools.com

HTML to PDF

Paste HTML or open one file, then create and download a PDF.

Paste HTML or open one UTF-8 file · up to 3,106,986 UTF-8 bytes

2 PDF LAYOUT

Paste HTML or open one file to start.

PDF pages are image-based, with selectable text.

In your browserNo uploadsNo account

How to convert HTML to PDF

  1. Add your HTMLTo convert an HTML document to PDF, paste a self-contained document or choose one UTF-8 .html or .htm file.
  2. Choose the page settingsSelect US Letter or A4 and a margin preset, then select Create PDF.
  3. Review and downloadReview every generated page, then download the PDF. The download uses your file name with a .pdf extension; pasted code downloads as document.pdf.

The preview is built from that generated PDF, not a separate HTML approximation.

Page breaks and tables

Text flow and headings

A block that fits on a fresh page moves there intact. A long text block or list can continue on later pages. A heading is kept with the next block when the pair fits on one page.

Explicit page breaks

CSS break-before: page and break-after: page are recognized at supported block boundaries; leading page breaks do not create a blank first page.

Rows and repeating headers

Ordinary table rows stay together. A thead repeats on each continuation page.

Tables that stop conversion

A row taller than the printable page stops conversion with a clear error, rather than being cut in half. Nested tables and vertically merged cells are rejected. Wide tables wrap within the printable width; content that still overflows stops conversion. This is not a full CSS print engine.

Support and limits

HTML and CSS

Headings, paragraphs, bold and italic text, lists, block quotes, preformatted code, ordinary tables and embedded PNG, JPEG or WebP images. Inline styles and simple selectors in style blocks support fonts available on this device, text colors, backgrounds, borders, spacing and text alignment. Font substitution and unsupported CSS can change the source appearance.

For a static document, use normal block flow. Scripts, forms, embedded frames, SVG, animations, external stylesheets, web fonts and external images are removed or blocked. Flexbox, grid, floats, fixed or absolute positioning, columns, CSS-generated content and arbitrary web applications are outside the supported layout. Removed content or styles are reported with the result.

Input limits

One source at a time: 3,106,986 bytes of UTF-8 HTML (about 3.1 MB), 5,000 elements and 200,000 text characters maximum; up to 30 PDF pages. Embedded images count toward the input limit. Images above 16 million decoded pixels, oversized blocks and unsupported text-layer glyphs stop conversion. English documents are the current test scope; no multilingual accuracy promise is made.

Self-contained files

No URL input or remote resource fetching is provided. An HTML export that depends on a neighboring CSS file or image folder is not self-contained. Embed supported assets first. Review the output instead of assuming an entire website can be reproduced.

PDF output

Pages are rendered as 2× page images with a selectable, searchable text layer. This preserves supported appearance but does not create a tagged accessible PDF, vector artwork, editable Word layout, form fields or active hyperlinks. Text selection order can differ in complex layouts. Preview rendering and large documents consume browser memory, especially on phones; no physical-phone performance measurement is claimed.

Test files and results

Tested on:

On October 24, 2026, we opened these original, self-contained English HTML files in this tool, downloaded the generated PDFs and visually checked all 11 pages. All three runs used US Letter with 0.75-inch / 19.05 mm margins.

Original HTMLActual PDFObserved result
Project notes HTML
7,494 UTF-8 bytes
Three-page notes PDFAll 14 records, headings, list items and indented code remained visible. No blank first page or title-only page. Each record heading stayed with its paragraph.
Service register HTML
7,762 UTF-8 bytes
Six-page table PDFAll 36 numbered rows were complete. Headers repeated on all six pages. Each row's start and end markers stayed on the same page; long cells wrapped inside their columns.
Embedded image HTML
33,737 UTF-8 bytes
Two-page handout PDFThe complete chart border, four bars, labels and values remained visible on page 1. The explicit page break placed the follow-up notes on page 2. Image lettering remained part of the picture, not selectable text.

We also tried three unsupported structures. Nested tables returned “Nested tables are not supported.” Vertical merges returned “Vertically merged table cells are not supported.” A row taller than the page returned “A table row is taller than the printable page. Shorten the row or use smaller text.” None offered a PDF download.

Download the page-by-page check record and sample notes and reuse terms. The record combines visual inspection of rendered PDF pages with text-layer marker checks. Extracted markers that wrapped across lines were compared after removing whitespace. These small samples do not test the input-size cap or physical-phone performance, and do not establish the result for other HTML.

Local processing and privacy

The first conversion loads the local PDF libraries and text font. Your source and result stay in browser memory; there is no account, saved conversion history or conversion server.

Remote resources in your HTML are blocked, and source content is not submitted to a conversion service.

Frequently asked questions

Why are images missing from my PDF?

External images are blocked. To turn an HTML file to PDF with its images, embed each PNG, JPEG or WebP image as a data URL. An HTML export that depends on a neighboring image folder is not self-contained.

Page updated: