Giving a PDF to ChatGPT or Claude without wasting tokens

Attaching the PDF is the expensive way. Here is what actually happens to your document, and what to do instead.

What happens when you attach a PDF

It is easy to assume the model just reads the text. It does not. Every page is rendered to an image, and the page's text is extracted and sent alongside that image. You pay for both.

Per pageTokens
Extracted text1,500 – 3,000
Page image~1,500, and up to ~4,784 on high-resolution models
Total~3,000 – 7,800

A 40-page report therefore lands somewhere between 120,000 and 310,000 tokens before the model has answered anything.

The same document as Markdown

Roughly 300–500 tokens per page. Three things account for the difference: there is no page image; there is no layout scaffolding; and running headers, footers and page numbers appear once rather than forty times.

Measured on real files:

DocumentAs a PDFAs MarkdownSaved
6-page sales deck18,000–46,7041,34693–97%
4-page mutual NDA12,000–31,1361,84385–94%
2-page bank statement6,000–15,56887785–94%
1-page invoice3,000–7,78428690–96%

The conversion itself is free

No model is involved in converting. A PDF already stores its text and the position of every character — extracting it is ordinary computation, the same kind your PDF reader does when you select a paragraph. iLoveMD does it in your browser, so it costs nothing and sends nothing.

When you should still attach the PDF

Converting throws away the visual layout, so attach the original when the layout is the question:

Rule of thumb: if you would be equally happy reading the document in a plain text editor, convert it. If you need to look at it, attach it.

Getting the Markdown into the chat

Paste it directly. Markdown is the format these models are most fluent in — headings, lists and tables survive as structure rather than as visual noise, so "summarise section 3" keeps working. If the text is very long, paste it as a file rather than a message; a .md attachment is read as text and does not trigger the image-rendering path a PDF does.

Convert your PDF, then paste the Markdown into the chat.

Convert a PDF now

Questions people ask

How many tokens does a PDF use in ChatGPT or Claude?

Roughly 3,000 to 7,800 tokens per page. Each page contributes extracted text (1,500–3,000 tokens) plus a rendered image of the page (around 1,500, and up to 4,784 on high-resolution models). A 40-page document can exceed 300,000 tokens.

Does converting a PDF to Markdown cost tokens?

No. Extraction is ordinary local computation — a PDF already contains its text and that text's position. No language model is involved, and with iLoveMD the file is not even uploaded.

Is Markdown better than plain text for an AI model?

Usually yes. Plain text loses the document's structure. Markdown keeps headings, lists and tables as explicit structure, which is what lets a model answer questions about a specific section or read a table correctly, for barely any extra tokens.

Should I ever attach the PDF instead of converting it?

Yes — when the layout is the question. Attach the original if you are asking about page design, about charts whose meaning is not in the caption, about a scanned signature, or if the PDF is a scan with no text layer at all.