Skip to content
PageSaver

How to Convert PDF to Markdown for ChatGPT and Claude

To convert a PDF to Markdown for free, open PixelPDF PDF to Markdown, choose your PDF, pick an Output style, and click Process. Check the preview, then click Copy Markdown to paste it into ChatGPT or Claude, or download the .md file. The conversion runs in your browser, so the PDF is never uploaded.

Before that, it's worth asking whether you need to convert at all. ChatGPT and Claude both accept PDFs directly, and for a quick question that's often enough. This guide covers when uploading the PDF is fine, when Markdown works better, how to use the converter we make, and a few other free options.

Why Markdown works better than pasting raw PDF text

A PDF describes how a page looks: which characters go where. It usually doesn't say "this is a heading" or "this is a table cell". Select all, copy, paste into a chat, and much of that structure is gone:

  • Headings become ordinary lines. Nothing marks a section title as different from the sentence after it.
  • Tables flatten. Cells come out as a run of words and numbers, and it's easy to match a value to the wrong column.
  • Two-column pages can get mixed up. Depending on the PDF, lines from both columns may end up in the wrong order.
  • Equations fall apart. Superscripts, subscripts and fractions turn into loose characters.

Markdown keeps that structure with a few plain characters: # before a heading, | between table cells, $$ around an equation. The README of Microsoft's MarkItDown, a converter built for AI tools, explains the appeal: mainstream language models understand Markdown well, and its conventions are "highly token-efficient."

We'd put the benefit modestly. Markdown won't make a model smarter, but it hands over the headings and table rows the PDF had, and it lets you see exactly what text the model is getting. Because it's plain text, you can also cut what you don't need, such as references, appendices or legal boilerplate, so the chat spends its context on the part you're asking about.

The built-in way: upload the PDF to the chat

If you just want to ask about a document, attach the PDF in ChatGPT or Claude and skip conversion. The limits are generous:

  • ChatGPT takes files up to 512 MB, and text and document files are capped at 2 million tokens each, according to OpenAI's File Uploads FAQ.
  • Claude takes up to 20 files per chat, up to 500 MB each. For PDFs of 100 pages or fewer, it reads both the text and visual elements such as charts; for longer PDFs it reads the text only. That's from Anthropic's help page on uploading files.

When uploading the PDF is good enough

For a one-off question about a clean, text-based PDF, uploading it is the simplest option, and we'd do the same. Converting first is worth it when:

  • you want to check or edit what the model reads, for example to drop sections or fix a table before asking about it,
  • you reuse the same document in several chats, models or tools, including ones that only accept text,
  • the PDF is a scan with no text layer, or
  • you also want the content in your notes, a wiki or a Git repo.

A note on privacy: converting locally keeps the PDF on your device, but any Markdown you paste into an AI chat is sent to that service like any other message.

How to convert a PDF to Markdown with PixelPDF

  1. Open PDF to Markdown. There's nothing to install and no account to create.
  2. Drop in one PDF, up to 50 MB.
  3. Under Output style, choose Faithful or Compact. Tick Mark where each page starts if you want to refer back to page numbers.
  4. Under Scanned pages, leave Read image-only pages with local OCR on and pick a Recognition language.
  5. Under Charts and figures, decide whether to keep Preserve charts and figures on, and choose the Figure output.
  6. Click Process. Look over the Markdown and Formatted tabs in the preview, then click Copy Markdown or download the result.

The preview shows the first 4,000 characters; the download and the copy contain everything. You'll also see a short conversion audit with how many pages went through OCR and how many tables, equations and figures were rebuilt or kept. It tells you where to look when you double-check.

Faithful or Compact?

Faithful, the default, stays close to the original document, including its finer formatting. Use it for notes, documentation or a repo. Compact trims formatting for a shorter file, which is the one to pick when you're pasting into an AI chat.

Tables, equations and figures

Headings, paragraphs, lists and the reading order of multi-column pages are kept. Supported tables are rebuilt from the page layout as Markdown tables instead of being flattened into a line of cells. Supported display equations become LaTeX, including superscripts, subscripts and fractions. Contents pages and box-and-connector diagrams are rebuilt where supported.

The word "supported" matters. Tables with merged cells or formulas are worth comparing with the PDF, and the result tells you how many pages had tables.

With Preserve charts and figures on, detected figures are saved one of two ways. ZIP with image files gives you the .md file and the images together in one ZIP. Single Markdown with inline images puts the images inside the Markdown file, which keeps everything in one file but makes it larger. If you're pasting into a chat, use the ZIP option or turn figures off: inline images are long blocks of encoded data, and Copy Markdown copies them along with the text.

Scanned PDFs

A page that is only a picture has no text to extract. With Read image-only pages with local OCR on, those pages are read in your browser in English, Chinese or a mixed English and Chinese option. Pages that already have usable text are left as they are. OCR can misread characters, so compare important names and numbers with the PDF, and expect a long scan to take a while.

If you want more control over a scan, run it through Scanned PDF to Text first, then convert the searchable copy.

Other ways to convert PDF to Markdown

Microsoft MarkItDown is a free, MIT-licensed Python tool. Install it with pip and run markitdown path-to-file.pdf > document.md. It's a good fit for converting many files in a script, and it requires Python 3.10 through 3.14. Its README is upfront that the output "is meant to be consumed by text analysis tools" and may not be the best option for high-fidelity conversions people will read. Scanned PDFs need the separate markitdown-ocr plugin, which does OCR through an LLM you connect it to.

Pandoc is the classic command-line document converter, but it can't read PDFs. Its FAQ says so plainly and suggests opening the PDF in Word or Google Docs and saving it in a format pandoc can convert from. Pandoc does read Word files, so PDF to DOCX to Markdown is a workable route if you already use it.

Should you convert a PDF to Markdown or to Word?

Pick by what happens next. Markdown is plain text with structure, made for AI chats, notes apps, wikis and repos, where the layout doesn't matter. Word is for a document that still has to look like a document: a contract you're revising, a report you're filling in, or a file you're sending to someone who works in Word.

For that, use PixelPDF PDF to Word. It creates a real editable DOCX, not page screenshots pasted into Word. It keeps supported headings, lists, tables and page breaks, embeds supported figures, reads scanned pages with OCR, and also runs in your browser. It's also the easy first step for the pandoc route above.

And if the thing you want in Markdown is a web page rather than a PDF, skip the PDF entirely: here's how to save a webpage as Markdown with PageSaver, our browser extension, where Markdown saves are free on every plan.

Which one should you use?

For a quick question about a text-based PDF, upload it straight to ChatGPT or Claude. When you want to see and trim what the model reads, keep tables and equations intact, or work from a scan, convert it with PDF to Markdown and paste the Compact output. For batch jobs in a script, MarkItDown is worth a look. If the next step is editing the document rather than asking about it, use PDF to Word.

The PixelPDF tools are free, need no account, and handle files up to 50 MB in your browser without uploading them. If a PDF doesn't convert the way you expect, choose Not quite in the feedback box after the conversion and tell us what went wrong. That's how most of our fixes start.