Parse the structure, plan the pages, inspect the PDF

Markdown to PDF Converter

Convert Markdown to PDF online free without signing up. Upload or paste Markdown, render GFM tables, tasks and code blocks, choose the page style, then inspect every generated page before downloading.

Upload or paste Markdown GFM tables, tasks and code Safe local PDF workflow

Upload or paste Markdown.

Use a Markdown file or write directly in the editor.

.md, .markdown, .mdown, .mkd or .txt · 2 MB max0 / 300,000 characters

Planned page preview

Add source content to calculate the page flow.

Page thumbnails will appear here.

Shape the PDF.

Choose fixed page and rendering settings, then inspect the real output before downloading.

Pages
Not planned yet
Paper
A4 · portrait
Detail
1800 px wide · recommended
Encoding
Crisp pages

This Markdown to PDF converter turns an uploaded file or pasted Markdown into a structured, previewed PDF in your browser. It renders common Markdown and GitHub Flavored Markdown features, gives you page and typography controls, and makes unsupported images and sanitized HTML visible before download.

Markdown describes structure rather than a fixed page. A heading, table or code block can be rendered differently by GitHub, a documentation site, an editor preview and a PDF generator. Converting Markdown therefore requires two decisions: how to interpret the syntax and how to fit the resulting document onto physical pages.

This page makes both decisions inspectable. You can edit the source, see structural counts, preview the first four planned pages, choose paper and reading settings, and inspect the actual generated PDF before downloading it.

How to convert Markdown to PDF online

  1. Upload a Markdown file or paste source text. The page accepts .md, .markdown, .mdown, .mkd and .txt files up to 2 MB, or direct input up to 300,000 characters.
  2. Review the source in the editor. Uploaded text remains editable. Changes affect the PDF source but do not modify the original file on your device.
  3. Check the parsed structure. The converter counts headings, links, image references, tables, fenced code blocks, task items and raw HTML tokens.
  4. Choose line-break behavior. Enable Treat line breaks as breaks only when each source newline should become a visible break. Standard Markdown normally combines ordinary lines into one paragraph.
  5. Choose paper, orientation and margins. Use A4, US Letter or US Legal in Portrait or Landscape.
  6. Set typography and page style. Choose a fallback font, 9–18 pt base size, line spacing and Document, Technical or Compact styling.
  7. Inspect the planned thumbnails. Look closely at tables, code, long URLs and any image placeholders.
  8. Choose rendering detail and page encoding. High resolution with Crisp PNG pages is the readable default; Standard and Balanced JPEG can reduce output size.
  9. Create the PDF. The progress panel shows parsing, pagination, rendering and result preparation stages.
  10. Review and download. The result panel displays the actual PDF Blob and records the settings and Markdown diagnostics used to create it.

Changing the Markdown or any output setting clears the previous result. That behavior prevents an outdated PDF from being mistaken for the current source.

Upload, paste and edit Markdown

The upload picker accepts common Markdown extensions plus .txt. A TXT file uploaded here is interpreted as Markdown source, which differs from the TXT to PDF converter: this page recognizes Markdown syntax, while TXT to PDF preserves plain text and offers encoding controls.

Direct input is useful for README excerpts, release notes, meeting notes, technical instructions and short documentation pages. The editor reports the current character count and enforces the same 300,000-character browser limit for pasted and uploaded text.

Uploaded files are read as browser text. There is no encoding selector in the current Markdown workflow. Modern UTF-8 Markdown is the reliable choice. If an older file displays corrupted punctuation or non-Latin characters, open it in a trusted editor, save it as UTF-8 and upload the new copy.

The first level-one heading is detected as a source title signal, but the PDF metadata title remains an explicit editable field. This lets you keep a concise PDF title even when the document begins with a longer visible heading.

Understand supported Markdown

The renderer uses GitHub Flavored Markdown behavior for common structures:

  • ATX and setext headings;
  • paragraphs and hard line breaks when enabled;
  • ordered and unordered lists;
  • nested list items supported by the parser;
  • links and inline emphasis;
  • blockquotes and horizontal rules;
  • inline code and fenced code blocks;
  • tables, task lists and strikethrough.

The GitHub Flavored Markdown specification describes the table, task-list and strikethrough extensions that users commonly associate with GFM. The current base97 renderer supports those practical features, but it does not attempt to reproduce every GitHub interface style.

Raw HTML is allowed only through a sanitization step. Unsafe elements and attributes are removed before the content enters the page planner. Sanitization is not the same as full browser-page rendering: scripts, embedded applications, forms and arbitrary layout behavior are outside the product scope.

The result report includes a raw HTML count as a review signal. When that count is nonzero, inspect the visible output to confirm that the remaining sanitized structure still communicates the intended content.

Choose page and reading settings

Markdown has no native paper size. The controls on this page define the PDF layout.

Paper and orientation

SettingPractical use
A4Documentation and reports shared internationally
US LetterGeneral documents in the United States
US LegalTaller reference sheets or long-form notes
PortraitProse, instructions and narrow tables
LandscapeWide tables, code samples and long technical lines

Margins alter both readability and wrapping. Narrow margins fit more content. Wide margins create more whitespace but can turn a wide table or code block into more lines and pages.

Font and style

Sans serif is a practical default for documentation. Serif can suit long prose. Monospace applies one fallback family to the complete document and can help highly technical material, although code blocks already use a monospace stack.

Document style balances prose and headings. Technical style gives code and structured blocks stronger separation. Compact style reduces vertical spacing when the document has many short sections. The base font size and line spacing affect headings, paragraphs, lists and tables together.

The tool uses browser font fallbacks rather than embedding a guaranteed font file. Glyph coverage and line breaks can vary by operating system. Review CJK text, mathematical symbols and uncommon scripts at normal zoom.

The optional footer shows the source label and Page n of total. For uploaded files, the source label is the filename. For direct input, it is Pasted Markdown. The footer is part of the rasterized page and cannot be edited separately after download.

Markdown structures have different PDF risks.

Code blocks: Fenced code is preserved as preformatted, wrapping monospace text in a bordered block. There is no syntax highlighting, language-theme rendering or horizontal scrolling inside the PDF. Long tokens can wrap to fit the printable width. Use Landscape or a smaller base size for wide code.

Tables: GFM tables render as full-width bordered tables. Narrow columns and ordinary prose work well, but a table with many columns, long URLs or unbroken identifiers can become dense. Try Landscape, Narrow margins or a smaller font, then inspect every column in the thumbnail and final PDF.

Links: Link text remains visibly styled in the rendered page, but the rasterized output does not create clickable PDF link annotations. Include the destination as visible text when a printed or noninteractive reader must know the URL.

Images: Markdown image syntax is counted but not fetched. The renderer replaces each image with a visible placeholder containing the alt text and source reference. This applies to remote URLs, relative project paths and data references. The behavior avoids hidden network requests and makes omissions explicit, but it means the PDF is not a complete visual export of image-heavy Markdown.

Task lists: GFM task items render with disabled checkboxes. They show the saved checked or unchecked state but are not interactive PDF form fields.

Raw HTML: Sanitized headings, paragraphs, lists, tables and other allowed structural elements can remain. Scripts, event handlers and embedded applications are not executed. Complex CSS from a documentation site is not imported.

Review the generated PDF

Start with a visual pass:

  • confirm the heading hierarchy and section order;
  • compare the first and final source paragraphs;
  • inspect every table column and long code line;
  • look for visible image placeholders;
  • confirm task states and strikethrough text;
  • check non-Latin characters and symbols;
  • verify that the footer does not compete with the last content line;
  • compare the planned and generated page count.

Then read the result report. It records the actual output size, source size when a file was uploaded, title, source label, paper, orientation, margins, footer state, font, font size, line spacing, page style, heading and code counts, tables, links, image placeholders, task items, rendering detail and page encoding.

The report describes the conversion, not the quality of the writing or the semantic correctness of the Markdown. A document can parse without errors and still contain the wrong links, an accidental heading level or an incomplete section.

Illustrative Markdown to PDF examples

Convert a README without images

Assume README.md contains headings, paragraphs, lists and fenced commands. Use A4 Portrait, Normal margins, Sans serif, 11 pt and Technical style. Inspect command wrapping and confirm that inline links remain readable even though they will not be clickable.

Convert release notes with a compatibility table

Assume release-notes.md contains a wide GFM table. Start with Landscape and Narrow margins. If long package names still wrap excessively, shorten the visible labels in the source or move detailed values into a list.

Convert notes copied from an editor

Paste the source directly and keep Treat line breaks as breaks disabled first. Enable it only if intentional single newlines disappear and the document was written with hard visual line breaks rather than Markdown paragraphs.

Illustrative examples. Actual page count, wrapping, file size, font coverage and processing time depend on the Markdown, browser and selected settings.

Scope, alternatives and honest limits

The current page parses Markdown with marked using GFM behavior, sanitizes the resulting HTML, lays it out into fixed browser pages and rasterizes each page. pdf-lib then assembles those page images into the downloadable PDF. The workflow runs in the current browser and does not require a base97 file-conversion endpoint.

The practical base97 difference is inspectability: editable source, structure counts, explicit image placeholders, raw HTML warnings, page controls, live page planning, an actual PDF preview and a result report are part of one workflow. This does not replace a complete publishing system.

The tool does not load remote or relative images, import CSS themes, apply syntax highlighting, generate a table of contents, create bookmarks, resolve wiki links, run Mermaid, render mathematical notation, execute HTML or JavaScript, convert a public URL, merge multiple files or export an exact clone of GitHub, VS Code or another Markdown preview.

The generated PDF stores static page images. It has no selectable or searchable text layer, tagged heading structure, clickable links, interactive tasks, forms, attachments, PDF/A mode, encryption, digital signatures or OCR. Use a documentation generator, Pandoc-style publishing workflow or editor-native export when those features are required.

Troubleshoot Markdown to PDF problems

The file is rejected

Confirm the file ends in .md, .markdown, .mdown, .mkd or .txt, is no larger than 2 MB and contains no more than 300,000 characters.

Characters look corrupted

The uploaded file may not be UTF-8. The current Markdown tool does not expose manual encoding controls. Resave the file as UTF-8 in a trusted editor, or use the TXT tool when encoding inspection is the main task.

Ordinary line breaks disappear

Standard Markdown joins ordinary source lines within one paragraph. Enable Treat line breaks as breaks when each newline is intentional. Avoid enabling it merely to repair missing blank lines between paragraphs.

A table is too wide

Choose Landscape, Narrow margins or a smaller font. Shorten long URLs and unbroken identifiers in the source. If the table remains unreadable, restructure it as several smaller tables or definition-style sections.

Code wraps unexpectedly

The PDF cannot scroll horizontally, so long code tokens wrap. Try Landscape, a smaller font or shorter visible lines. Syntax highlighting is not available in the current renderer.

An image is replaced by text

That is intentional. The tool does not fetch Markdown images. The placeholder exposes the alt text and source so the omission can be reviewed instead of silently producing a broken box.

Raw HTML looks different

The HTML is sanitized and displayed without external site CSS or scripts. Rewrite important structures in ordinary Markdown or use a dedicated HTML-to-PDF workflow when browser-page styling is the actual requirement.

The PDF is too large

Choose Standard rendering detail and Balanced PDF. PNG keeps small text and table rules crisp but often creates a larger file than JPEG.

The PDF text cannot be selected

That is expected. The current output is image-based. Use a text-aware publishing tool when selection, search, accessibility and live links are necessary.

Markdown to PDF FAQ

Can I paste Markdown instead of uploading a file?

Yes. Type or paste directly into the editor. The structure report and page preview update after the source settles, and the same page controls apply to uploaded and pasted Markdown.

Does the converter support GitHub Flavored Markdown?

It supports common GFM tables, task lists and strikethrough, along with headings, lists, links, blockquotes, inline code and fenced code blocks.

Will Markdown images appear in the PDF?

No. Images are replaced with visible text placeholders. The current tool does not download remote images or resolve relative project paths.

Does fenced code receive syntax highlighting?

No. Code blocks use a readable monospace treatment, but language-specific highlighting and editor themes are not part of the current renderer.

Is the generated PDF text selectable?

No. Each page is rasterized and embedded as an image. Choose a text-aware publishing workflow when search, copy, accessibility tags or live links are required.

Research and editorial notes: Tool scope and behavior were checked against the base97 implementation on October 2, 2026. GFM terminology follows the public GitHub Flavored Markdown specification; output claims are limited to the current parser, sanitizer and raster-PDF pipeline.