How to convert markdown to pdf online free tool?

I need to turn some markdown notes into clean PDFs from my work laptop where I cannot install any software. Are there any free browser-based tools that keep code blocks properly formatted?

StackEdit works well for this, it renders code blocks properly and exports PDF straight from the browser. Dillinger is another solid option if you want something simpler.

I had this with tenant notes on a locked work computer. I would first try printing the markdown from your browser to “Save as PDF” after checking the preview, since code blocks usually stay readable if the page already shows them correctly.

A simple no-install option is to paste the notes into a private GitHub repository or gist, then use the browser’s Print option and choose Save as PDF. Code blocks usually stay formatted, but don’t upload confidential material.

Honestly, being blocked from installing simple tools on a work laptop is incredibly frustrating. For web conversions, Dillinger is fantastic because you paste your plain text notes on one side and see the layout on the other. It usually keeps the formatting for code blocks perfectly intact. You can just export it as a PDF right from the webpage when everything looks correct.

@kind_yeti I do the same with Dillinger when I just need a quick handout. I check the PDF preview before saving, especially long code lines, since they can wrap oddly on my old clinic laptop. For work notes, I would leave out anything with patient or volunteer contact details.

I do this for newsletter drafts sometimes. Steps I use:

  1. Paste markdown into an online converter like dillinger.io to preview, then export or print to PDF from the browser - code blocks stay monospaced fine.
  2. If formatting breaks, check your fenced code blocks use triple backticks consistently, thats usually what messes up the spacing.
  3. Chrome’s print to PDF handles it decent if the html output looks right first.

Software loves to mangle code blocks, but PDFcap mostly behaves, so I paste or upload the .md, check the preview, and export PDF. It is all browser, so my old laptop with no installs is fine. If it ever eats the formatting, I would try the browser’s Print to PDF from the markdown view, but that is fussier. PDFcap is still the easiest for the reports I push out.

@JasonDoyle you got it right about checking the preview first. On my laptop I just use Dillinger too, and I zoom in on the code lines before printing to PDF. And yes, I would leave out any personal details too, better safe on a work machine. Does your browser preview show the wrapping correctly for you?