Most people pick a file format by accident — whatever fell out of the tool they used. PDF came out of the print dialog, DOCX came out of Word, JPG came out of the phone. For humans that is fine; they mostly care whether the thing opens. It is not fine for AI tools, which read the raw text underneath and perform very differently on different formats. This page gives you a short decision tree and five worked examples that cover the cases we see most often.
Answer three questions
The tree below asks three things: what you are starting with, what you want to do with it, and which AI tool you are using. It then tells you the conversion to run and the shape of prompt that usually works. Restart any time.
What are you starting with?
Pick the format of the document you already have.
Why the answer is almost always markdown
Run the tree a few times and you will notice most branches end at markdown. That is the pattern, not laziness. AI models were trained on huge amounts of markdown from GitHub, Stack Overflow, Reddit, Wikipedia, and technical docs; they are native speakers of it. Markdown is also the most token-efficient way to encode structure. # is one character where an HTML <h1> tag is twelve. For the full token math, see Markdown basics and the blog post on real token savings from markdown.
Every other consideration affects how you use markdown rather than whether you should. Summarize or extract? Same target format, different prompt. ChatGPT or Claude? Same target format, slightly different splitting strategy. The exceptions are narrow: spreadsheets past a few hundred rows where CSV wins on tokens, and training data where you need JSONL pairs at the end.
Worked examples
Real shapes of real problems. Each example shows the source, the goal, the tool, and the route we would take. Got an odd one? Look it up in the glossary or check the free tools.
1. Corporate lawyer reviewing a SaaS contract in Claude
Sarah, a mid-market tech lawyer, opens a 120-page SaaS vendor agreement delivered as a native PDF — think a Salesforce or DocuSign-style MSA. She needs to summarize key clauses, flag unusual indemnification language, and pull out the termination terms before a Friday call.
- Source: PDF (native, not scanned)
- Goal: summarize + extract
- Tool: Claude (context window handles the full doc)
- Route: Convert to markdown first so clause headers and numbered lists survive. Preserve tables — SaaS agreements love nested tables. Split the markdown by H2 (major sections), then ask Claude for a section-by-section summary. Follow up with targeted extraction prompts per clause type.
Tools: PDF to Markdown. Further reading: Convert legal documents for AI review, Lawyer privilege and secure conversion.
2. Finance analyst summarizing Apple's 10-K in ChatGPT
Earnings season. A sell-side analyst at a mid-tier investment bank pulls Apple's latest 10-K (around 80 pages of filings plus exhibits) from SEC EDGAR and needs a clean summary of business risks, revenue breakdown by segment, and any year-over-year shift in the language around accounting policies before the morning note goes out.
- Source: PDF (native, long)
- Goal: summarize, with some extraction
- Tool: ChatGPT (GPT-5 or GPT-4o with long context)
- Route: PDF to markdown, preserving tables. The financial statements section is the critical one — verify those tables converted correctly. Split by top-level heading (Item 1, Item 1A, etc.) and run each through the model separately for better attention. Compare year-over-year by feeding last year's markdown in parallel.
Tools: PDF to Markdown, Financial reports converter. Further reading: Convert financial statements for AI analysis.
3. PhD student building a NotebookLM research notebook
Priya is a third-year climate-policy PhD at UBC. She has forty EPUBs (mostly IPCC-era reference books) and around a hundred PDF papers scraped from arXiv and Google Scholar on carbon pricing. She wants to chat across the whole corpus and get grounded citations back for her lit review chapter.
- Source: Mixed EPUB + PDF library
- Goal: grounded Q&A across the corpus
- Tool: NotebookLM
- Route: Convert everything to markdown, one file per source. Upload each markdown file as a source in NotebookLM. For the EPUBs especially, markdown preserves chapters so citations stay meaningful. Ask grounded questions and always request the citation alongside the answer.
Tools: EPUB to Markdown, PDF to Markdown, Batch convert. Further reading: Convert research papers for NotebookLM, EPUB to markdown for academics.
4. Genealogist reading 1920s handwritten Ellis Island records
A retired schoolteacher in Boston has roughly 40 scans from Ancestry of handwritten 1920 US Census entries and marriage certificates for her grandmother's family. Tesseract-based OCR produces gibberish because the handwriting is loopy cursive and many scans are grainy microfilm reproductions.
- Source: Images (scans of handwritten documents)
- Goal: extract names, dates, and relationships
- Tool: AI Vision, then ChatGPT or Claude
- Route: Skip traditional OCR entirely — run each image through AI Vision, which handles handwriting that Tesseract would shred. Output comes back as structured markdown. Feed the markdown into ChatGPT or Claude with an extraction prompt that asks for a JSON record per document.
Tools: AI Vision, AI Vision for Genealogy, Image to Markdown. Further reading: Why OCR fails, Convert handwritten notes to text.
5. Series B startup building a support chatbot over internal docs
A 120-person Series B SaaS company (fintech vertical) wants a Slack-embedded support chatbot that answers questions over their public help center, internal runbooks, and the last two years of Zendesk tickets. Sources are a mix of Notion exports, HTML help articles, PDFs of onboarding runbooks, and XLSX tag taxonomies maintained by a single ops engineer.
- Source: Mixed — HTML, DOCX, PDF, XLSX
- Goal: RAG (retrieval-augmented generation)
- Tool: Custom app, probably LangChain or LlamaIndex over Pinecone
- Route: Convert every source to markdown. Standardize chunk size (300–800 tokens) and always chunk on H2/H3 boundaries. Keep metadata: source URL, department, last-modified date. Embed into Pinecone. At query time, retrieve the top chunks and pass them plus the user question to the model. For tickets, keep the customer question and the final agent response as a single chunk so retrieval returns both.
Tools: HTML to Markdown, Word to Markdown, PDF to Markdown, Excel to Markdown, API access. Further reading: Build a RAG knowledge base, RAG document preparation.
When the decision tree gets it wrong
The tree is a fast default, not a law. Four cases where you might depart from it:
- Tables that matter more than prose. If your document is 90% financial tables, sometimes skipping markdown and giving the AI raw CSV (one CSV per table) works better.
- Heavily redacted documents. Black boxes over text in a PDF often break conversion. Convert page-by-page and expect to hand-fix ambiguous sections.
- Right-to-left or heavily multilingual sources. Markdown still works, but double-check the conversion preserved directionality and character encoding.
- Already-structured data. If you have JSON from an API, keep it as JSON — don't convert to markdown first. Models read JSON well, and you preserve the shape for programmatic post-processing.
Next steps
Pick the conversion tool from your recommendation above and try it on one real document from your work. If the output surprises you (formatting wrong, tables scrambled, missing sections), check our file formats guide for format-specific gotchas, or look up the exact term that tripped you up in the glossary. Still want to write Markdown by hand first? Start with the free Markdown editor.