DO IT EASY APP
English

Markdown and HTML to PDF

Write Markdown or HTML, see the preview and save it as a PDF with selectable text.

  • No sign-up, no fees, no watermark.
  • Write Markdown or HTML and see the preview instantly.
  • Turn HTML into a PDF with selectable text.
  • Page size, margin, font size and orientation settings.
  • Tables, code blocks and lists are supported.
  • What you write is processed, but never shared with anyone.

How to use the Markdown and HTML to PDF tool

Let's turn your README, class notes or a simple report into a proper PDF:

  1. Pick the format. Markdown or HTML. If you're not sure: if headings are written with # and bold text with **, it's Markdown; if there are tags like <p> and <h1>, it's HTML.
  2. Write or paste your text. Type in the Source box on the left. The printable version shows up instantly in the Preview area on the right.
  3. Set up the page. Choose the Page size (A4, Letter), the Margin (mm), the Font (pt) size; tick Landscape if you want a landscape page.
  4. Press the Save as PDF button. Your browser's print window opens. Choose "Save as PDF" as the destination (printer) and press Save.

Don't want the date and address lines? In the print window, open "More settings" and untick "Headers and footers".

What is Markdown to PDF conversion?

Markdown is a simple writing language that lets you write headings, lists, bold text and tables by adding a few marks to plain text. README files on GitHub, many note apps and technical documents are written in Markdown. HTML is the language of web pages. Both look good on screen, but to send or print them, a PDF is a better fit. That's what people search for as "MD to PDF" and "HTML to PDF": turning what you wrote into a PDF document with a page layout.

This tool saves the preview with your browser's own PDF maker. The nice thing about this method is that the writing stays real text in the PDF: the file is small, the text looks sharp at every zoom level, and the text can be copied and searched. There's no extra library to download, either.

What's supported?

  • Headings, bold and italic text, lists, links
  • Tables (including Markdown table syntax)
  • Code blocks and quotes
  • Embedded images with data: addresses

Safety and limits

  • Scripts in HTML aren't run and are removed.
  • Images, fonts or styles aren't loaded from outside addresses; the page blocks them.
  • The font is your device's system font.
  • Long tables and code blocks try not to split at the end of a page; if one is very long, it flows onto the next page.

Tips for turning HTML into a PDF

The preview is an almost exact copy of how the PDF will look. Before you save, check whether long tables and code blocks fit on the page. If they don't, reduce the font size by a point or two, lower the margin or switch to a Landscape page. For wide tables, a landscape page is often the cleanest fix.

  • To add an image, turn your picture into a data: address with Image to Base64 and embed it as ![description](data:...) or <img src="data:...">.
  • Check your Markdown first: to see in detail how what you wrote looks, there's the Markdown preview.
  • Page break: in HTML mode, write <div style="break-after: page"></div> to move to a new page.
  • Combine several documents: make each one a separate PDF, join them with Merge PDF, then number them with Add page numbers.
  • If you need a PDF from photos, Image to PDF is a better fit.

Frequently asked questions

Is converting Markdown to PDF free?

No cost at all. It doesn't add a watermark, either. Not bad, right?

Does what I write go to a server?

The preview and the PDF are prepared in your browser. What you write is processed, but never shared with anyone.

There's no "Save as PDF" in the print window. What should I do?

Open the destination list; the option sometimes appears as "Microsoft Print to PDF" or "Save to PDF". On a phone, look in the share or print menu.

Does it work on a phone?

Yes. The share or print menu of your phone has "Save as PDF" or a similar option.

Can I decide where the page breaks?

In HTML mode you can add a page break by writing <div style="break-after: page"></div>.

Why don't images from outside addresses show up?

The page doesn't load content from outside addresses. Embed the image with Image to Base64.

Is the text in the PDF selectable?

Yes. Your browser's PDF maker saves the writing as real text; it can be copied and searched.

Do scripts in HTML run?

No. For safety, scripts are removed; only the appearance is carried into the PDF.

I don't know Markdown. Where do I start?

Put # at the start of a line for a heading, ** on both sides of a word for bold, and - at the start of a line for a list. Even that is enough for a nice PDF.

Related tools