Skip to content
M MarkdownPDF

Markdown to PDF with code highlighting

Export developer docs to PDF with full syntax highlighting via highlight.js — and code blocks that stay whole on the page instead of being sliced in half.

Open the converter

Free · runs in your browser · nothing uploaded

Dozens of languages

highlight.js colors JavaScript, Python, Go, Rust, SQL, shell and many more.

Code never cut

Long code fences are kept together so a function is never split across pages.

Long lines wrap

Overlong lines wrap to the page width instead of overflowing the margin.

Selectable code

Copy code straight out of the exported PDF — it is real text, not an image.

Related

Frequently asked questions

Which languages are highlighted? +

The common highlight.js bundle covers ~35 popular languages including JS/TS, Python, Java, C/C++, C#, Go, Rust, Ruby, PHP, SQL, YAML, JSON, Bash and more.

Why do code blocks and tables get cut in other converters? +

Most tools ignore page-break rules, so atomic elements get sliced across page boundaries. We apply break-inside: avoid to code blocks, tables, images and headings, so they stay whole on a single page.

Is the exported PDF text selectable? +

Yes. We use the browser print engine to produce a true vector PDF with selectable, searchable text and clickable links — not a flattened image.

Does it support Mermaid diagrams and LaTeX math? +

Yes. Mermaid diagrams render to vector SVG and KaTeX renders math — both appear crisply in the PDF, along with syntax-highlighted code.