MDUtil

PDF to Markdown Converter

Open a PDF and get Markdown with its headings, lists, tables and links rebuilt from the text. The file is converted in your browser and never uploaded.

PDF file

Drop a file here or choose one

A PDF up to 100 MB

Choose a file
Open a PDF to see its Markdown here.
0 characters0 lines

How to convert PDF to Markdown

  1. Open the PDF

    Drop a PDF on the box or choose it. PDFs saved from Word, Google Docs, LaTeX and browsers work best.

  2. Check the result

    Headings, lists, tables and links are rebuilt from the page layout; the Preview tab shows them rendered.

  3. Copy or download

    Copy the Markdown or download it as a .md file.

PDF to Markdown, before and after

The sample PDF and the Markdown the converter reads from it. Headings come from the type sizes, and the table from text that lines up in columns. Click Sample above to convert the same file.

The sample PDF
The Field Notes pilot report as a PDF: a title, two headings, a bulleted list, a table and a numbered list.
Markdown
# Field Notes Pilot Report

Twelve researchers used the **Field Notes** app for six weeks in three regions. This report sums up what worked, what did not, and what we change next. The full data set is on the [project page](https://example.com/pilot).

## Results

Notes were recorded offline *87 percent* of the time, and every note reached the server within a day.

- Average sync time fell from 40 seconds to 12 seconds
- No notes were lost during the pilot
- Photo uploads used most of the mobile data

| Region | Researchers | Notes |
| ------ | ----------- | ----- |
| Coast  | 4           | 1,210 |
| Hills  | 5           | 1,654 |
| Valley | 3           | 890   |

## Next steps

1. Compress photos before upload
2. Add a map of each day's notes
3. Start the second pilot in May

What it handles

Headings from type sizes
The three largest type sizes become # to ### headings, ranked across the whole document, and a short bold line set apart by space becomes the next level.
Lists and tables
Bullets, numbers and drawn list markers become Markdown lists, and rows that line up in the same columns become a table.
Links and footnotes
Web links keep their addresses, and a small raised note number matched with its note at the foot of the page becomes a Markdown footnote.
Clean page flow
Headers, footers and page numbers that repeat from page to page are dropped, and paragraphs that cross a page break are joined.
Chinese and Japanese
Lines of Chinese and Japanese text are joined without stray spaces where they wrap.
Code blocks
Text in monospaced fonts becomes fenced code blocks, even when a block continues on the next page.

What each part of a PDF becomes in Markdown

A PDF stores positioned text, not structure, so the structure is rebuilt from type sizes, fonts and the layout. The table shows the Markdown you get and what each part is recognized by.

In the PDFMarkdownHow it is read
Headings
# Field Notes Pilot Report
## Results
The three largest type sizes that stand out from the body text become #, ## and ###
Bold lines
### Background
A short bold line with clear space above and below becomes the next heading level; otherwise it stays **bold**
Bold and italic
**Field Notes** *87 percent*
From the font's name, such as Bold or Italic; text that is only slanted, without an italic font, stays plain
Links
[project page](https://example.com/pilot)
Web links are kept; links to a place inside the PDF become plain text
Lists
- Item
1. Step
Lines that start with a bullet or with a number such as 1., a) or iv.; nesting follows the indent
Check boxes
- [ ] To do
- [x] Done
From ☐ and ☑ at the start of a line
Tables
| Region | Notes |
| ------ | ----- |
| Coast  | 1,210 |
Rows that split into the same columns; a table with empty, merged or wrapped cells stays text
Code
```
npm run build
```
Lines set in a monospaced font; a block that runs onto the next page stays one block
Footnotes
Text[^1]

[^1]: Note.
A small raised number matched with a note in smaller type at the foot of the same page
Paragraphs
One paragraph, joined across the page break.
Lines are joined into paragraphs, across page breaks too
Headers, footers, page numbers
—
Removed when they repeat on most pages; the header of a one-page PDF is kept
Images and drawings
—
Removed
Scanned pages
—
There is no text to read; a scan needs text recognition first

Convert PDF to Markdown from the command line

MarkItDown

Microsoft's MarkItDown reads the text of a PDF quickly, with little of its structure.

pip install 'markitdown[pdf]'
markitdown report.pdf -o report.md

Marker

Marker uses machine-learning models to read scans, formulas and complex tables, and runs best on a computer with a graphics card.

pip install marker-pdf
marker_single report.pdf --output_dir out

Pandoc writes PDF files but cannot read them.

Questions and answers

How do I convert a PDF to Markdown?

Open the PDF above and copy or download the Markdown on the right. The PDF is read in your browser, page by page.

Does it work with scanned PDFs?

No. A scanned page is a picture of text, so there is nothing to read; the converter tells you when a PDF looks like a scan. Run it through OCR first, then convert the result.

Why is a table or a column wrong?

A PDF stores where each piece of text sits, not which table or column it belongs to, so both are worked out from the layout. Simple tables convert well; tables with merged cells and pages in several columns may need fixing by hand.

Are formulas turned into LaTeX?

No. Formulas come out as the characters they are printed with. For papers full of math, Marker rebuilds LaTeX with a machine-learning model.

Is there a size limit?

Files up to 100 MB. Long documents take longer, because every page is read in your browser.

Is my PDF uploaded anywhere?

No. The conversion runs in your browser, so the file never leaves your device.