Skip to content

HTML to PDF

Convert HTML files or Markdown (.md) to PDF with searchable text, working links and bookmarks from the headings, or paste the code. Nothing is uploaded.

  • Runs in your browser
  • Nothing is uploaded
  • Free, no sign-up

or drop it here, with any pictures it uses. It is converted on your device: nothing is uploaded.

Or paste HTML or Markdown

Read it as

Settings

Text the page sizes itself in pixels keeps its size.

How it works

Your browser is the best HTML engine on your device, so this converter lets it lay the document out, one page width at a time, in a hidden frame that can't run scripts or load anything. Markdown is first turned into HTML with GitHub's rules. The document's own style is kept, and its print style too, as when you print it. The text is then cut into pages between lines, and every word is written into the PDF where the browser put it, as real text you can search and copy. Links keep working and headings become bookmarks.

Text is set in Liberation Serif, Sans or Mono (free fonts that match Times New Roman, Arial and Courier New), whichever is closest to the font the document asks for. Pages are A4 or Letter, A5, or 6 × 9 inches for reading on a tablet.

Have plain text with no formatting? Use text to PDF, which keeps every line as it is. Ebooks go through EPUB to PDF.

Questions

How do I convert an HTML file to PDF?

Choose the .html file, or drop it on the box above, with the pictures and style sheets it uses if they are separate files (a page saved from a browser keeps them in a folder next to it). It is laid out on pages straight away, with a preview; pick the page size and download the PDF. You can also paste HTML. There is no account, no watermark and no limit.

How do I convert Markdown to PDF?

Choose the .md file or paste the Markdown, and the PDF is made with GitHub-style formatting: headings, lists, task lists, tables, code blocks, quotes and links. Headings become bookmarks in the PDF. Pictures the Markdown names can be added alongside it.

Is my file uploaded anywhere?

No. Other HTML and Markdown to PDF converters upload the file to their server. Here your browser lays it out and writes the PDF, so it never leaves your device. The page doesn't download anything the file points to either: pictures, style sheets and fonts on other websites are left out, and the page tells you how many.

Can it convert a web page from its URL?

No, because fetching a page would mean a server reading it for you. To keep a web page as a PDF, open it and use your browser's Print, then Save as PDF. Or save the page with the browser's Save page as (Webpage, complete) and convert the saved file here. Scripts in a file are never run, so pages that build themselves with JavaScript come out as they were saved.

Limits

Files up to 30 MB, with up to 500 pictures and style sheets (200 MB) added alongside. Scripts, forms, videos, frames and anything on another website are left out, so the PDF shows the file as it was saved, with its own styles and pictures; parts a page draws with scripts or web components are missing. Background colours and pictures set in CSS aren't carried into the PDF; borders and lines are. The document's own web fonts are replaced by Liberation fonts. Letters these fonts don't have, such as Chinese, Japanese, Korean, Arabic, Thai, Indian scripts and emoji, are drawn as pictures by your browser: they look right but can't be searched or copied. Pages built for wide screens are laid out to the width of the paper.

Privacy

This tool runs entirely in your browser. The files you open and what you type are never sent to a server, and nothing is stored after you close the page. See the privacy page.

Related tools