# Convert a PDF to Markdown

Rebuild the text of a PDF as Markdown, with headings, lists and paragraphs ready to edit. Your file is parsed on this device, with no upload step.

## In short

CommonMark, the precise Markdown specification now at version 0.31.2, keeps structure in plain text: `#` marks a heading and `-` a list item. pd00 reads a PDF’s text layer with pdf.js and writes a `.md` file in which lines at least 12% larger than the body text become `#` to `###` headings, bulleted or numbered lines become lists, and each page break becomes a `---` rule.

## How to use PDF to Markdown

1. **Load a PDF that contains text**  
   Pick a PDF or drop it onto the tool. It needs a text layer: if you can’t highlight words in your PDF viewer, the file is a scan and should go through OCR PDF first.
2. **Read through the preview**  
   The rebuilt Markdown shows up on the page. Check that headings and lists landed where you expect, particularly in documents with columns or tables.
3. **Copy it or keep the .md**  
   Press Copy to paste the Markdown into an editor, wiki or chat, or download it as a .md file to keep alongside your other notes.

## A worked example

A two-page guide, `guide.pdf`, sets its body text in 10 pt, the title in 18 pt, section headings in 14 pt and subheadings in 12 pt, with steps marked by “•”. The resulting `guide.md` contains:

- `#` for the 18 pt title, `##` for the 14 pt headings and `###` for the 12 pt subheadings (12 ÷ 10 = 1.2, above the 1.12 threshold);
- `-` in place of every “•”;
- a `---` line where page 2 begins.

An 11 pt line stays body text (11 ÷ 10 = 1.1). The exception is a bold line under 80 characters that isn’t a list item and doesn’t end in a period, colon, semicolon or comma: it becomes a `###` heading too.

## What it covers, and its limits

- Needs a text layer: a scan produces no Markdown until [OCR PDF](https://pd00.com/ocr-pdf/) has added one.
- Tables become plain lines, not GitHub Flavored Markdown tables, and images are left out; save those with [Extract Images from PDF](https://pd00.com/extract-images-from-pdf/).
- Only three heading levels: a fourth or smaller heading size is also written as `###`.
- Bold, italics and links aren’t marked up, and two-column layouts may interleave lines from neighboring columns.

## Sources

- [CommonMark Spec](https://spec.commonmark.org/), CommonMark
- [GitHub Flavored Markdown Spec](https://github.github.com/gfm/), GitHub
- [PDF.js](https://mozilla.github.io/pdf.js/), Mozilla

Links checked on October 10, 2026.

## About PDF to Markdown

A PDF records where each run of text sits on the page and how large it is, but it rarely says which line is a heading or which lines belong to a list. This converter reads the text layer with pdf.js and makes those calls itself, then writes the result in Markdown:

- **Headings** are guessed from text set in a larger font than the body.
- **Lists** come from lines that start with a bullet symbol or a number, which turn into bulleted or numbered items.
- **Paragraphs** are rejoined: lines the PDF broke at the right margin flow back together, so you don’t get a hard line break every dozen words.
- **Page breaks** are marked with a horizontal rule, `---`.

The Markdown appears in a preview on the page. A **Copy** button puts all of it on your clipboard, or you can save it as a `.md` file. Being plain text, the output opens in any editor and drops straight into wikis, note apps and documentation sites that use Markdown.

### Treat the structure as a first draft

Every heading and list in the output is an inference from visual clues. A heading set in bold at body size may come out as an ordinary line, while a large pull quote can be promoted to a heading. Skim the preview before you rely on it, especially for long or heavily designed documents.

## When people use it

### Moving an old manual into a wiki

A product guide that survives only as a PDF can become Markdown pages with its section headings and step lists intact, ready to split into topics and edit in your documentation system.

### Editing a report whose source file is gone

When the original word-processor file is lost, Markdown gives you editable text with its outline in place. Make your changes, then produce a fresh PDF with Markdown to PDF.

### Feeding a long document to an AI assistant

Chat assistants read Markdown easily, and the heading markers tell them which section a paragraph sits in. Paste in the sections you need rather than attaching the full PDF.

## Tables, images and multi-column pages

**Tables** aren’t rebuilt as Markdown tables. Inside a PDF a table is just words placed at coordinates, with no record of rows or cells, so cell contents come out as separate lines of text. Recreate important tables by hand, or keep a faithful picture of the page with [PDF to PNG](https://pd00.com/pdf-to-png/).

**Images** are left out of the Markdown. To keep photos, charts and figures, save them with [Extract Images from PDF](https://pd00.com/extract-images-from-pdf/) and link them into your Markdown yourself.

**Multi-column layouts** such as newsletters and academic papers may interleave, with lines from neighbouring columns alternating. Single-column documents exported from a word processor or a web page give the cleanest result.

## Scans need a text layer first

A scanned PDF contains page images and no characters, so this tool has nothing to read and the Markdown comes out empty. Run the file through [OCR PDF](https://pd00.com/ocr-pdf/), which recognises the words and adds an invisible text layer, then bring the new file back here. OCR has its own error rate, so proofread names and figures in what you get.

## Markdown, plain text or images: which output to pick

- **Markdown (this tool)** when you want the document’s outline: headings, lists and clean paragraphs you can keep editing.
- **Plain text** from [PDF to Text](https://pd00.com/pdf-to-text/) when you want the words exactly as stored, with page markers and no guesses about structure.
- **Images** from [PDF to PNG](https://pd00.com/pdf-to-png/) when the precise look of each page matters more than editable text.

## What carries over, and where it happens

Characters come across exactly as the PDF stores them, so nothing is lost to resolution or compression. What Markdown can’t describe is left behind: fonts, colors, spacing and the exact position of things on the page. The resulting `.md` file is small, since it holds text and a few formatting symbols only. If the file is locked, clear its password with [Unlock PDF](https://pd00.com/unlock-pdf/) (you’ll need to know it) and convert the unlocked copy.

The conversion happens inside this browser tab, and neither the PDF nor the Markdown is uploaded; you can [confirm that yourself](https://pd00.com/privacy/#verify) in a few steps.

## Questions and answers

### How do I convert a PDF to Markdown?

Add the PDF here and the Markdown appears in the preview. Press **Copy** or save it as a `.md` file.

### Why is the Markdown output empty?

There were no characters to read: the file is most likely a scan or a set of photos saved as PDF. Make it searchable with [OCR PDF](https://pd00.com/ocr-pdf/), then convert the result.

### Are tables converted into Markdown tables?

No. PDFs don’t store tables as rows and cells, so each cell’s text comes out as an ordinary line that you can rearrange into a table by hand.

### What happens to images and charts?

They are omitted from the Markdown. Use [Extract Images from PDF](https://pd00.com/extract-images-from-pdf/) to save the embedded pictures separately.

### Why did a normal line turn into a heading?

Headings are guessed from font size, so any line printed noticeably larger than the body text, like a pull quote or a big number, can be marked as one. Remove the `#` characters to turn it back into a paragraph.

### What do the --- lines between sections mean?

Each one marks where a new page began in the PDF. Keep them as separators or delete them for continuous text.

### Is the PDF uploaded during conversion?

No. pdf.js reads the file in your browser and the Markdown is built on your device. Here is [how to check it](https://pd00.com/privacy/#verify).

Last updated October 10, 2026  
https://pd00.com/pdf-to-markdown/
