How to convert Markdown to PDF on Android

If you have an .md file on your phone and need a PDF to send, print, or keep, you can do it right on your device. You do not need a computer or a website.

Steps

  1. Install PilcrowMD (free, no ads, no account).
  2. Open your .md file in PilcrowMD by tapping it in your file manager or an email attachment.
  3. In the reader view, tap the Export PDF icon in the top bar (a page with "PDF" on it).
  4. Android's save screen opens. Pick a folder and a name, then tap Save. To send the PDF, share it from your Files app.

That is all it takes. The PDF gets real A4 pages, page numbers, and clear print styling. It keeps the same headings, lists, tables, code, and math as your document.

What the PDF looks like

The PDF is formatted for paper: white pages, dark text, and page numbers at the bottom. Page breaks never cut a block in half. It does not use the dark theme from your screen, so it prints clearly and is easy to read anywhere. Code blocks print on a light panel, in colour.

Why do it on the phone

Common questions

Does it keep tables and code? Yes: headings, lists, tables, code blocks with colours, and math all go into the PDF. Two limits, the same as on screen: bold, links or math inside a table cell show as plain text, and Mermaid diagrams print as their code.

Can I export a file someone emailed me? Yes. Open the attachment in PilcrowMD, then export it.

Does it work with AI answers? Yes, as long as the answer is saved as an .md file. See What is an .md file?.

Also on Mac: PilcrowMD for Mac (beta)