Shard Tools

Markdown to PDF

Convert Markdown into a paginated PDF with headings, lists and code blocks laid out as real text.

Maintained by Roshan.

Use Markdown to PDF

Lays Markdown out as a real PDF in this tab. Headings, lists, quotes and code blocks are typeset as selectable text, not printed to an image.

Built-in fonts only, which limits the alphabetPDF's fourteen standard fonts cover Latin script and little else. Text in Chinese, Japanese, Korean, Arabic, Hebrew or Cyrillic, and any emoji, cannot be written with them - those characters become question marks and the count is reported rather than hidden.

Explore pdf tools

Find related browser-local tools for nearby tasks without starting another search.

Browse all pdf tools

About Markdown to PDF

Markdown exists to be readable as plain text and rendered as something better, and a PDF is usually where it goes when it has to leave a repository: a README sent to a client, documentation attached to a proposal, notes circulated to people who will not open a code editor. The conversion here reads the structure and typesets it - headings get their own scale and spacing, lists keep their markers and nesting, quotes are set apart, code blocks are held in a monospaced face so alignment survives. Everything lands as selectable text rather than an image. What this deliberately does not attempt is a faithful reproduction of a browser's rendering, because matching a CSS engine needs a CSS engine, and a converter that gets tables almost right is more annoying than one that says plainly which parts it handles.

What happens to the PDF

  1. Headings from one to six hashes are recognised, with levels beyond three treated as the third, since a PDF page rarely benefits from six distinct sizes.
  2. Bulleted and numbered lists keep their markers, and indentation in the source becomes indentation on the page so nesting reads correctly.
  3. Fenced code blocks are set in a monospaced font and their contents are left exactly as written, so Markdown characters inside a code sample are not interpreted as formatting.
  4. Block quotes are indented and set in a lighter italic face, and horizontal rules are drawn as actual lines rather than printed as dashes.
  5. Inline markers are removed so they do not print literally: bold, italic, inline code and strikethrough all resolve to their text, and a link becomes its label followed by the address in brackets, which is the only way a printed page can carry a destination.

Common markdown to pdf jobs

Sending a README to someone outside the team

Headings, lists and code blocks all carry over. Check the result if the file leans on tables, since those come through as plain lines.

Meeting notes into a circulated document

Notes are mostly headings, bullets and quotes, which is exactly the subset this handles well. Add page numbers afterwards if it runs long.

Check before relying on the PDF

Questions about Markdown to PDF

Are tables supported?

No. Laying out columns properly needs measurement and reflow this tool does not do, and an almost-right table is worse than plain text. The rows print as written.

What happens to images?

Their alternative text is printed. Fetching remote images would mean making network requests with your document's contents, which this site does not do.

Why is bold not bold?

Rendering mixed emphasis within a line requires per-run measurement, and with built-in fonts only the payoff is small. The markers are removed so they do not print as asterisks.

Is the text selectable afterwards?

Yes. The PDF is typeset with real fonts, so it can be searched and copied. Nothing is rasterized.

Does my Markdown leave this device?

No. Parsing and typesetting both happen in this tab, and no image or font is fetched from anywhere else while it runs.

Related tools

PDF to Markdown

Turn a PDF into structured Markdown in your browser. Headings are inferred from font size, paragraphs and lists are rebuilt, and no file is ever uploaded.

TXT to PDF

Turn a plain text file into a paginated PDF in your browser. The result holds selectable text, not a screenshot.

Add Page Numbers to PDF

Stamp page numbers onto an existing PDF in your browser. Choose the position, the starting number and which page to begin on.

DOCX to Markdown

Convert a Word document to Markdown in your browser. Headings, lists, tables and emphasis all survive. Nothing is uploaded.

JSON to Markdown Table

Turn a JSON array into a Markdown table in your browser, with pipes escaped so columns stay intact.