Skip to content
AI Tools
Runs on your deviceNothing you type here is sent anywhere — the whole tool is JavaScript in this tab.

PDF Native vs Markdown Tokens

Drop a PDF. See what a native file upload costs in vision + text tokens against clean Markdown, side by side — with real GPT-4o, Claude and Gemini pricing.
Fixes the $50 surprise PDF bill

Controls

Drop a PDF here, or click to browse

One file at a time — 200+ page PDFs are fine, up to 300 DPI

Your PDF is read by pdf.js in this browser tab. Nothing is uploaded — you can check the Network tab or disconnect from the internet after the page loads.

Result

Sample document — drop your own PDF to replace it

Markdown saves

74%

21,850 tokens saved · ~$0.0546 per request (GPT-4o) · ~$54.62 at 1,000 requests/month

Native PDF upload (vision door)

29,450 tokens

Vision tiles
21,250
Text
8,200

Uploaded as a file, each page is rendered and billed as vision tiles — on top of its own text tokens.

Clean Markdown (text door)

7,600 tokens

No vision component — headers, footers and page furniture stripped.

## Q3 Regional Sales Report

Revenue grew 18% quarter over quarter, led by the North region.

| Region | Revenue | Growth |
| --- | --- | --- |
| North | $2.4M | +24% |
| South | $1.1M | +9% |
| East | $1.8M | +15% |

Headcount additions are planned for Q4 in North and East...
Native
29,450
Markdown
7,600

Cost by model

ModelNativeMarkdownSaved
GPT-4o$0.0736$0.0190$0.0546 (74%)
Claude Sonnet 5$0.0589$0.0152$0.0437 (74%)
Gemini 3.1 Pro$0.0589$0.0152$0.0437 (74%)

Approximate — verified against each provider's official pricing page as of August 31, 2026. Providers change prices without notice; check their page before a billing decision. Vision-token estimate uses GPT-4o's own tiling formula as a cross-provider approximation — Claude and Gemini may tile a rendered page differently.

Per-page breakdown

10 pages
PageVisionTextNative total
12,1259503,075
22,1258202,945
32,1257802,905
42,1259003,025
52,1257602,885
62,1258402,965
72,1257002,825
82,1258803,005
92,1258102,935
102,1257602,885

What is PDF native vs Markdown token cost?

When a PDF is uploaded as a file — Claude's Files API, Gemini's file upload, ChatGPT's attach-a-file — the provider doesn't just read the text. It renders each page as an image and bills those pixels as vision tokens, on top of whatever text it also pulls out. Convert the same PDF to Markdown first and only the text tokens remain: no rendering, no tiles, no vision cost at all.

How many tokens does a PDF cost?

PDF typePagesNative (vision + text)MarkdownTypical saving
Text-heavy report10~21,000-29,000~7,000-8,50065-75%
Research paper20~42,000-58,000~14,000-17,00065-75%
Scanned PDF (no text layer)10100,000+ (image-only)~5,000 (after OCR)90-95% (~10-20x)

Ranges, not a single number — they depend on font density, table layout, and page size. Drop your own PDF above for its exact figures.

Why does a PDF cost 3x more tokens? Vision door vs text door

Vision door: a rendered page is tiled in 512x512-pixel chunks — a standard letter page at a typical rendering resolution tiles to roughly a dozen tiles, at 85 + tiles×170 tokens. That's 2,000+ tokens before a single word of text is counted. A scanned page, which is only pixels, pays this in full with nothing else to offset it.

Text door: Markdown carries none of that. A page of body text runs a few hundred to roughly a thousand tokens, full stop — no rendering step, no tiles.

Independent benchmarks report Markdown cutting 65-90% off PDF, HTML or DOCX token counts across large document sets; this tool runs that same comparison against the one PDF you actually care about.

Best converters for PDF to Markdown, and when native still makes sense

  • Plain-text extraction (what this tool uses, similar in shape to pdfplumber) — fastest, leanest output, best for a text-selectable PDF with simple layout.
  • Table/layout-aware converters (Docling-class) — a few percent more tokens in exchange for preserved table structure on layout-heavy documents.
  • OCR converters (Marker-class) — the only path that works on a scanned PDF at all; see the scanned-PDF row above for how much bigger that gap is.
  • Native upload is still the right call when the model needs to actually see the page — a chart, a signature, a diagram, a layout where position carries meaning. Text extraction of any kind throws that away.

Frequently asked

How many tokens does a PDF cost?
It depends on how you send it. Uploaded as a native file to a Claude/Gemini/ChatGPT File API, a text-heavy page typically runs 1,500-3,000 tokens once vision tiles and text are both counted — a 10-page report can land around 20,000-30,000 tokens. Converted to Markdown first, the same page is usually 600-900 text tokens, with no vision component at all.
Why does a PDF cost more tokens than Markdown?
A native file upload goes through the vision door: the provider renders the page as an image, tiles it, and bills those tiles as tokens — in addition to whatever text it also extracts. Markdown only ever goes through the text door: no rendering, no tiles, just the words. That vision component is the entire gap.
How much can I save converting a PDF to Markdown before sending it to an LLM?
On a typical text-selectable document, 60-75% of the token count. On a scanned PDF the gap is far larger — a full-page image can run 10,000+ vision tokens a page against maybe 500 tokens once OCR turns it into text, often a 10-20x difference.
Should I always convert PDFs to Markdown before an LLM call?
For any text-selectable PDF — reports, contracts, resumes, papers — yes, it is strictly cheaper with no loss of the words. Keep the native upload only when the model genuinely needs to see the page as an image: a chart, a signature, a scanned form, or layout that carries meaning text alone can't.
Does converting to Markdown lose anything?
The text content is preserved; only the visual rendering is dropped. Tables are rewritten as Markdown tables and headings are kept, but a diagram, photo, or handwritten annotation that only exists as pixels does not survive text extraction — that is the case to keep the native upload for.
Are these token numbers exact?
They're a careful estimate, not the provider's own count: the vision-tile math mirrors GPT-4o's published tiling formula (an image is tiled in 512x512 chunks, 85 + tiles x 170 tokens), and the text side uses a fast character-based approximation rather than the exact tokenizer. Good enough to compare native vs Markdown honestly; check your provider's own usage dashboard before a billing decision.