PDF to Markdown: How to Convert a PDF (Tested Converters)

Convert PDF to Markdown on Mac, iPhone and Windows: Apple Notes export, three converters tested on tables and scans, online tools and privacy.

To convert a PDF to Markdown, use a converter that reads the page layout and writes headings as #, lists as - and tables as pipe tables, then check the result against the PDF. No Apple app converts a PDF to Markdown directly. The built-in workaround is to copy the text into Apple Notes, format the headings and lists, and export the note as Markdown (iOS 26, iPadOS 26, macOS Tahoe 26 and later). For long or table-heavy PDFs, a layout-aware converter saves hours, and scanned PDFs need OCR first.

Updated 7 November 2026. The Apple steps were checked against Apple's iPhone User Guide, the Notes User Guide for Mac and Apple Support on 7 November 2026. The converter test below was run the same day.

What PDF to Markdown conversion means

Markdown is plain text with light markup: # for a heading, - for a list item, **bold**, [text](link) and pipe tables. Notes apps, wikis, GitHub, static site generators and AI tools read it. A PDF stores something very different: positioned characters on a page, with no record of which line is a heading or which block is a table. A converter has to guess the structure from font sizes, positions and lines.

That guess is the whole job. Copying text out of a PDF is easy. Getting # Overview instead of "Overview" and a real table instead of 20 loose numbers is what separates a useful Markdown file from a text dump. Searches for "pdf to markdown" more than doubled over the past year. Notes apps, knowledge bases and AI tools all read Markdown, and it keeps the structure readable at a fraction of the size of the PDF.

Our test: three converters on the same PDF

On 7 November 2026 we made a two-page PDF with a title, numbered headings, a bold phrase, a link, a bullet list, a table with grid lines, the same table without lines, a two-column page and a footer with page numbers. We also made a scanned copy (each page saved as a 150 ppi image). We ran three common free tools on both files.

What we checkedpdftotext (Poppler 26.02)MarkItDown 0.1.9PyMuPDF4LLM 2.1
Headings as #No (plain text)NoYes, two levels
Bullet listBullet characters keptItems on separate lines, no list markersYes, - items
Bold textNoNoYes
Table with grid linesAligned with spacesOne cell per line, rows mixed upCorrect Markdown table
Table without linesAligned with spacesOne cell per lineAll cells on one line
Link URLLostLostLink text kept, URL lost
Two columnsSide by side, lines interleavedLeft column, then right columnLeft column, then right column
Footer "Page 1"KeptKeptKept
Scanned copyEmptyEmptyText via OCR (Tesseract installed), tables lost, one paragraph scrambled

The results show the three things to check in any converter's output. Tables are the weak point: only the table with drawn lines survived, and only in one tool. Links lose their address in all three. Scanned PDFs give you nothing at all unless the tool runs OCR. A text extractor such as pdftotext is a good first look, but it writes no Markdown.

How to convert PDF to Markdown on iPhone and iPad

Apple's iPhone User Guide for iOS 27 lists "Export a note as a Markdown file" in Notes, and Apple Support says Notes handles Markdown in iOS 26, iPadOS 26 and later. Notes cannot open a PDF as text, so the workaround has three parts: copy the text, format it, export it.

  1. Open the PDF in the Files app or Preview. Touch and hold a word, drag the selection handles over the text you want, then tap Copy.
  2. Open Notes, create a new note and paste.
  3. Format the structure: select a heading line, tap the Format button (Aa) and choose Heading or Subheading. Select list lines and choose a bulleted list. Notes turns these styles into Markdown on export.
  4. Tap the More button, then tap Export as Markdown. If the option is missing, tap the Share button first and look again.
  5. Choose how to send or save the note, for example Save to Files.

This works well for a few pages of text. It is slow for long documents, tables have to be rebuilt by hand, and Notes only writes the basic Markdown elements. For a scanned PDF, the text has to be recognised first, so the selection in step 1 finds nothing to copy. See how to make a PDF searchable.

How to convert PDF to Markdown on Mac

Apple Notes on macOS Tahoe 26 and later

  1. Open the PDF in Preview, select the text and choose Edit > Copy.
  2. Paste it into a new note in Notes and apply Heading, Subheading and list styles from the Format menu or the Aa button.
  3. Choose File > Export To and pick Markdown. Apple's guide says you can type a new name and add tags, then click Save.

Notes on Mac also has Edit > Copy as Markdown, which puts the selected part of a note on the clipboard as Markdown. That is handy for pasting one section into a wiki or a code repository.

Terminal tools (free, local)

If you are comfortable with Terminal and Python, three open-source tools run on your Mac without uploading anything:

  • PyMuPDF4LLM turns PDFs into Markdown, JSON or text and includes layout analysis without a GPU, according to its documentation. It did best in our test. Install it with pip install pymupdf4llm and call pymupdf4llm.to_markdown("file.pdf") in Python. Check its licence terms on Artifex's site before you use it in a commercial product.
  • MarkItDown is Microsoft's Python utility for converting files to Markdown for use with language models and text analysis. Its README says the output "may not be the best option for high-fidelity document conversions for human consumption", which matches our test. Run markitdown file.pdf -o file.md.
  • Docling is an MIT-licensed project that its README describes as having advanced PDF understanding, including reading order and table structure, OCR for scanned PDFs, Markdown export and local execution for sensitive data.

Pandoc, the standard tool for converting between text formats, cannot read PDF. pandoc --list-input-formats has no PDF entry. It can convert a Word file to Markdown, which makes a two-step route possible (below).

Limits of the built-in Apple method

  • No direct conversion. No Apple app opens a PDF and saves it as Markdown.
  • Structure is manual. Copied PDF text arrives as plain lines, so every heading and list needs formatting by hand.
  • Tables do not come across. Pasted table cells lose their grid.
  • Scans need OCR first. A scanned page has no text to copy until it is recognised.
  • Line breaks. Text copied from a PDF often has a hard break at the end of every printed line. Join the lines before you export.

How to convert PDF to Markdown on Windows

The Python tools above run on Windows too. Without Python, a two-step route uses Word and pandoc:

  1. Open the PDF in Word for Windows. Microsoft says Word makes an editable copy and leaves the original PDF unchanged. It works best for mostly text documents, and Microsoft warns that scanned pages, footnotes and some tables may not convert cleanly.
  2. Save the copy as a .docx file.
  3. Convert it with pandoc: pandoc file.docx -t gfm -o file.md. The gfm output writes GitHub-flavored Markdown with pipe tables.

Pandoc turns Word's Heading styles into # headings. If the converted document shows headings as plain bold text, apply Heading 1 and Heading 2 styles in Word before you run pandoc.

Online PDF to Markdown converters and privacy

Browser converters do the job without an install. CloudConvert's PDF to Markdown page promises "headings, lists and structure preserved where possible", and its security page says files are kept only for processing and deleted immediately afterwards (both checked 7 November 2026). Many smaller sites offer the same conversion with their own retention rules.

Some people upload the PDF to an AI chatbot and ask for Markdown. That can rebuild tables and headings well, but a language model can also shorten, reword or invent text, so compare the output line by line for anything you rely on. Very long PDFs can also exceed what a chatbot reads in one go.

Both routes send the document to someone else's server. That is fine for a public research paper. For contracts, medical records, client files or anything under an NDA, convert on your device. More in are online PDF editors safe.

PDF to Markdown methods compared

MethodPlatformHeadings and listsTablesScanned PDFsFile leaves your deviceChecked
PDF OpusiPhone, iPad, MacLayout analysisLayout analysisMake the PDF searchable with OCR firstNoProduct feature list
Apple Notes (copy, format, export)iPhone, iPad, Mac (26 and later)Formatted by handRebuilt by handNoNoApple guides, 7 Nov 2026
PyMuPDF4LLMMac, Windows, Linux (Python)YesLined tablesWith Tesseract installedNoOur test, 7 Nov 2026
MarkItDownMac, Windows, Linux (Python)No in our testNo in our testNo without a pluginNo (unless you add a cloud service)Our test and README, 7 Nov 2026
DoclingMac, Windows, Linux (Python)Yes per READMEYes per READMEYes per READMENoREADME, 7 Nov 2026
Word, then pandocWindows, MacIf Word applies Heading stylesOftenPoorNoMicrosoft Support, 7 Nov 2026
CloudConvertBrowser"Where possible" per vendorNot statedNot statedYesVendor page, 7 Nov 2026
AI chatbot uploadBrowser, appsUsuallyUsuallyOftenYesGeneral behaviour

How to convert a scanned PDF to Markdown

A scan is a picture of a page. Before any converter can write Markdown, the words have to be recognised with OCR. Two routes work:

  1. Make the PDF searchable first, then convert it like any other PDF. The OCR adds an invisible text layer behind the image, and the converter reads that layer. See how to make a PDF searchable with OCR.
  2. Use a converter with built-in OCR, such as Docling, or PyMuPDF4LLM with Tesseract installed.

Expect more clean-up with scans. In our test, OCR recovered the headings and paragraphs but lost both tables, and the first lines of a two-column page came out scrambled. Straight, high-contrast scans at 300 ppi give OCR the best chance.

How to clean up the Markdown

  • Remove page furniture. Running headers, footers and page numbers ("Field Guide v2 | Page 1" in our test) end up in the middle of your text. Search for them and delete them.
  • Fix heading levels. Converters guess levels from font size. Make sure there is one # title and that sections step down in order.
  • Join broken lines and hyphenated words that were split at the end of printed lines.
  • Rebuild tables that came out as loose cells. A pipe table needs a header row and a |---| separator line.
  • Restore links. All three tools in our test kept the link text but dropped the address.
  • Check the reading order on multi-column pages, sidebars and captions.
  • Preview the file in a Markdown editor or on GitHub before you publish or import it.

Troubleshooting PDF to Markdown

The output is empty

The PDF is a scan or the text is stored as images. Run OCR first, or use a converter with OCR.

The text is garbled or full of odd symbols

Some PDFs use fonts without a proper character map, so the converter cannot tell which letter each shape is. Symbols like (cid:127) in our MarkItDown output are bullet points that could not be mapped. Try another converter, or OCR the page so the text is read from the image.

Tables come out as one long line or one cell per line

The table has no drawn lines, or the tool does not detect tables. Try a layout-aware converter, convert the table to a spreadsheet instead (see how to convert PDF to Excel), or rebuild it by hand.

Columns are mixed together

Line-by-line extraction reads straight across both columns. Use a tool that detects columns, or crop the page into its columns first.

Headings are plain text

The converter could not tell headings from body text by size. Add # marks yourself, or use the PDF's bookmarks as a guide to the structure.

The PDF is password-protected

Open it with the password first and save an unlocked copy. Most converters refuse encrypted files. See how to remove a password from a PDF.

PDF Opus: the best app for converting PDF to Markdown (top pick)

The best app for converting PDF to Markdown is PDF Opus, a PDF editor for iPhone, iPad and Mac. Convert PDF to Word, Excel, PowerPoint, HTML, Markdown, text or images on your device. The conversion uses layout analysis. Side-by-side blocks are written one after another, and charts drawn as vector graphics are dropped, so check those parts of the output.

For scans, make scanned PDFs searchable on your device with Apple Vision; the original image stays unchanged. Then convert the searchable PDF to Markdown. Your documents are processed on your device. The app only goes online for purchases, licence checks (direct version) and update checks (direct version).

Going the other way, from Markdown to a finished PDF, is covered in Markdown to PDF. For plain text without any markup, see how to convert PDF to text on Mac.

Frequently asked questions

How do I convert a PDF to Markdown?

Use a PDF to Markdown converter that detects headings, lists and tables, then check the output against the PDF. Without extra software, copy the text into Apple Notes, format it and choose Export as Markdown on iOS 26, iPadOS 26, macOS Tahoe 26 or later.

What is the best PDF to Markdown converter?

It depends on the document. For text-heavy PDFs with simple tables, a layout-aware converter that runs on your device handles most of the structure. In our test, PyMuPDF4LLM produced headings, lists and a proper table, while MarkItDown and pdftotext produced plain text.

Can pandoc convert PDF to Markdown?

No. Pandoc does not read PDF files. Convert the PDF to Word first, then run pandoc file.docx -t gfm -o file.md, or use a dedicated PDF converter.

How do I convert a PDF to Markdown on Mac?

Copy the text from Preview into Notes, apply heading and list styles, then choose File > Export To > Markdown (macOS Tahoe 26 and later). For long PDFs, use a converter such as PyMuPDF4LLM or Docling in Terminal.

Can I convert PDF to Markdown on iPhone?

Yes, with Notes on iOS 26 or later: copy the PDF's text, paste it into a note, format headings and lists, then tap More > Export as Markdown.

How do I convert a scanned PDF to Markdown?

Run OCR first so the PDF has a text layer, then convert it. Some converters, such as Docling, include OCR.

Does PDF to Markdown keep tables and images?

Tables survive only in layout-aware converters, and best when the table has drawn lines. Images are usually left out or saved as separate files that the Markdown links to. Charts drawn as vector graphics are lost in most tools.

Why convert a PDF to Markdown for ChatGPT or other AI tools?

Markdown keeps headings, lists and tables in a compact text form that language models read well, and it is far smaller than the PDF. Convert on your device first if the document is confidential, then share only what you need.

Is there a free PDF to Markdown converter?

Yes. Apple Notes on iOS 26 and macOS Tahoe 26 is free, and PyMuPDF4LLM, MarkItDown and Docling are free open-source tools. Online converters have free tiers but upload your file.