CourseFeed

PDF to Markdown: turn a PDF reading into clean text for ChatGPT

By David Ahn · Updated 11 October 2026

Most course readings come as PDFs. If you turn one into plain text first, you can see exactly what the chatbot will read, and you can put the reading in the same document as the slides it goes with.

Do you need to convert it?

Not always. ChatGPT, Claude and Gemini can all read a PDF you attach. For one short PDF, especially one with figures you want explained, just attaching it is simpler and often works better.

Converting it is worth it when:

What a text layer is

A PDF can hold its words in two ways. If it was exported from Word, LaTeX or a publisher's system, it stores the actual characters and where they sit on the page. That's the text layer. If it came from a scanner or a phone camera, each page is just a picture.

Converters read the text layer, so if there isn't one, there's nothing to convert. Some scans have had text recognition (OCR) run on them, which adds a hidden text layer behind the picture. How good that layer is depends on the scan.

Before you convert, try selecting a sentence. If you can highlight individual words, there's a text layer. You can also press Ctrl+F (Cmd+F on a Mac) and search for a word you can see on the page. No match usually means it's a scan.

The most telling check is to copy a paragraph and paste it into a plain text editor. If the right words come out, conversion will work. If you get wrong letters, missing spaces or random symbols, the text layer itself is broken, and conversion will copy the mess.

If it turns out to be a scan, what to do with scanned PDFs has other ways to get the text out.

What CourseFeed uses

CourseFeed runs MarkItDown, an open-source converter from Microsoft. For PDFs, it pulls the text out with open-source PDF libraries. It runs in your browser, so the reading isn't uploaded anywhere.

MarkItDown extracts the text. It doesn't rebuild the document's structure, so despite the name, a converted PDF is mostly plain paragraphs with few or no Markdown headings. For a typical reading, like a book chapter or an article, that's plenty for a chatbot. Tools that use OCR or AI layout analysis can do better on complicated pages, but they're often slower or need you to upload the file to them.

What conversion keeps

What it loses or mixes up

Headings

Headings come out as ordinary lines, so nothing marks where a section starts. A heading that wrapped onto a second line comes out split. This is from a test reading:

Chapter 2: Function enzyme cell transport
molecule
Equilibrium structure catalyst diffusion equilibrium ...

"Molecule" is the end of the heading, but in the text it looks like a line of its own. If you want to ask about sections by name, put a # in front of each chapter or section heading in the .md file. It only takes a couple of minutes.

Line breaks

Each line of the original page becomes a line of text, so sentences break in the middle, and words hyphenated at the end of a line can stay split. Chatbots read through this fine. Don't bother fixing it.

Tables without borders

Conversion goes wrong here more than anywhere else. The same test reading has a small table of compounds with their mass and charge, and it came out like this:

Compound Mass (g/mol) Charge

Glucose

180.16

Sodium

22.99

0

+1

Glucose's charge, 0, ended up after sodium's mass. A chatbot reading that could easily pair the wrong numbers. For any table that matters, check it against the PDF, or attach a screenshot of it along with the text.

Columns

Two-column articles usually come out one column after the other, which is what you want. Sometimes lines from both columns get mixed together, especially where a figure, a box or a pull quote breaks up a column. If a paragraph reads like nonsense, compare it with the page.

Headers, footers and page numbers

Running headers (the course code or journal name), page numbers and copyright lines come out as text at every page break, sometimes in the middle of a sentence. It's mostly just noise. If there's a lot of it, tell the chatbot to ignore it.

Footnotes

Footnotes end up where they sit on the page, at the bottom of each page's text, which is often in the middle of a sentence that carries on to the next page. Footnote markers turn into ordinary digits stuck to the word before them, so "awake¹" can come out as "awake1".

Equations and symbols

Superscripts and subscripts come out flat: x² can turn into x2, and H₂O into H2O. Fractions lose their layout. Symbols from special math fonts can come out wrong or go missing, and equations stored as images disappear completely. For a math- or physics-heavy reading, keep the PDF open next to the chat, and either type the key equations into your message yourself or attach the page as an image.

Figures

Images and diagrams don't get converted. Their captions usually do, since a caption is text, so the chatbot knows there was a figure but not what's in it.

Five minutes of clean-up

Download the .md file and open it in any text editor. Then:

Leave the line breaks, hyphens and stray page numbers alone. They aren't worth your time.

Giving it to the chatbot

Tell the chatbot what it's looking at: "This reading was converted from a PDF. Line breaks follow the original pages, and page headers and footnotes are mixed into the text. Ignore them." Then ask your questions.

The converted text doesn't reliably mark where pages start and end, so don't trust a page number the chatbot gives you. Ask for a short direct quote instead and search the PDF for it with Ctrl+F. If the quote isn't there, the chatbot either made it up or paraphrased.

A long reading plus a week of slides can be more than a chatbot will take in at once. Paste or attach? covers what to do about that.

Convert your files