Most people do not care about file formats until one breaks something. Then suddenly it matters a lot. Your scanned PDF will not let you copy text. Your iPhone HEIC photos will not open on a Windows laptop. Your CSV crashes Excel on import. Your Word doc looks wrong on the reviewer's screen. This page walks through ten pairs of formats you keep running into, what each one is actually good at, and what to convert it to when you are done.
Each card ends with a pointer to the right conversion tool. The bottom line: most AI workflows are happier with markdown, and anything visual is happier with PNG or JPG than with proprietary formats. For a decision tree, see choosing a format. For the Markdown primer itself, see Markdown basics. Background reading: PDF vs markdown for AI tokens.
Quick comparison
Skim this first, then scroll down for the detail on each one.
| Format | Best for | AI-friendly? | Convert to |
|---|---|---|---|
| Final, printable docs | Workable | Markdown | |
| PDF/A | Long-term archiving | Workable | Markdown |
| DOCX | Editable writing | Works well | Markdown |
| DOC (legacy) | Old archives | Fight for it | DOCX first, then markdown |
| XLSX | Spreadsheets with formulas | Works well | Markdown tables or CSV |
| XLS (legacy) | Old spreadsheets | Fight for it | XLSX first |
| PPTX | Slides, decks | Works well | Markdown |
| EPUB | Reflowable ebooks | Works well | Markdown |
| MOBI / AZW | Kindle ebooks | Workable | EPUB first |
| TXT | Raw text | Works well | Markdown for structure |
| MD | AI-ready text | Works well | Already there |
| HEIC | iPhone photos | Workable | JPG or PNG |
| JPG | Photos on the web | Works well | Markdown via OCR |
| PNG | Screenshots, diagrams | Works well | Markdown via OCR |
| CSV | Tabular data | Works well | Markdown tables |
| TSV | Messy tabular data | Works well | Markdown tables |
| HTML | Web pages | Workable | Markdown |
| JSON | API responses | Works well | Markdown for docs |
| XML | Enterprise data | Workable | JSON or markdown |
PDF vs PDF/A
PDF (Portable Document Format)
The universal format for finished documents. Designed in 1993 by Adobe so a page would look identical on any screen or printer.
- +Looking exactly the same everywhere
- +Printing
- +Contracts, invoices, tax forms
- +Preserving fonts and layout
- −Being edited
- −Giving up their text cleanly
- −Reading order in multi-column layouts
- −Scanned PDFs are just images of text
ChatGPT, Claude, and Gemini all accept PDFs, but quality depends entirely on how the PDF was made. Native (text-based) PDFs usually work. Scanned PDFs need OCR first. Complex multi-column layouts often come out scrambled unless you convert to markdown first.
PDF/A (archival PDF)
A strict subset of PDF designed for long-term storage. Every font is embedded, no external dependencies, no interactive bits. Required by many courts and government archives.
- +Legal and regulatory archiving
- +Long-term readability (decades)
- +Self-contained — no missing fonts ever
- −Forms and interactive features
- −Smaller file sizes (everything is embedded)
- −Anything that changes after creation
Same story as regular PDF from the AI's perspective — it depends on whether the text layer is clean. PDF/A is just about compliance, not readability.
DOCX vs DOC
DOCX (Word, 2007 onward)
Microsoft's modern Word format. Under the hood it is a ZIP file full of XML — surprisingly open and well-documented for a Microsoft format.
- +Writing that needs to be edited
- +Tracked changes and comments
- +Consistent templates across a team
- +Being converted cleanly
- −Looking identical to the recipient (fonts, line breaks drift)
- −Version control — diffs are unreadable
- −Anything you want to publish on the web without cleanup
DOCX converts cleanly to markdown in almost every case because the structure is explicit: heading 1 is heading 1, a bullet list is a bullet list. If you have to feed an AI a Word document, send DOCX — not PDF exports of DOCX.
DOC (Word, 1997–2007)
The old binary Word format. Still lurks in legal and government archives. If you see a file without an x at the end, it's this.
- +Being readable 20 years later
- +Not much else
- −Modern tooling — most converters struggle
- −Preserving layout across Word versions
- −Everything DOCX is good at
Open it in Word or LibreOffice and save as DOCX first. Almost every conversion tool (ours included) gets better results from DOCX than from legacy DOC.
XLSX vs XLS
XLSX (Excel, 2007 onward)
Modern Excel. Zipped XML, multiple sheets, formulas, charts, pivot tables, and 1,048,576 rows per sheet — a 16× jump from XLS.
- +Financial models and calculations
- +Multi-sheet workbooks
- +Structured data with formulas
- +Tables and charts
- −Being diffed or version-controlled
- −Preserving layout across Excel versions (rare but happens)
- −Huge datasets — performance falls off a cliff past ~100k rows
Convert each sheet to a markdown table and AI tools handle it beautifully — headers, totals, footnotes all come through. If the sheet is huge, split it or convert to CSV instead so you spend fewer tokens.
XLS (Excel, 1997–2003)
The old binary Excel format. Capped at 65,536 rows. Still appears in finance and enterprise exports from systems built in the 90s.
- +Opening on a 2003 desktop
- +Being compact
- −The row limit — 65k fills fast in modern data
- −Modern parsing libraries
- −Anything collaborative
Re-save as XLSX in Excel or LibreOffice, then convert. Going direct from XLS to markdown is possible but error-prone.
PPTX vs PPT
PPTX (PowerPoint, 2007 onward)
Modern PowerPoint. Zipped XML, same family as DOCX and XLSX. The slide deck that runs your Monday meeting.
- +Visual storytelling
- +Client pitches and sales decks
- +Training materials
- +Speaker notes alongside slides
- −Being skimmed — slides hide detail behind layout
- −Reading order in busy slides
- −Being edited by multiple people at once (without 365)
Converting PPTX to markdown extracts slide titles, bullets, and speaker notes into a readable outline. This is how you hand a 60-slide deck to Claude without losing half the meaning to layout noise.
PPT (PowerPoint, 1997–2003)
The legacy binary PowerPoint format. Mostly replaced but still shows up in corporate training archives.
- +Running on ancient hardware
- +Nothing else worth mentioning
- −Fidelity across modern PowerPoint versions
- −Rich media — anything fancy breaks
- −Conversion tools in general
Open in PowerPoint or Keynote, save as PPTX, then convert.
EPUB vs MOBI
EPUB
The standard ebook format. Technically a zipped website — HTML, CSS, images — packaged to reflow on any screen. Every non-Kindle reader uses it.
- +Reflowing text to any screen size
- +Being cracked open as HTML
- +Clear chapter structure
- +Author, publisher, ISBN metadata baked in
- −Fixed layouts (cookbooks, technical diagrams)
- −DRM-locked copies — cannot be converted
- −Readable diffs
EPUB is secretly the cleanest book format for AI because it is structured HTML under the hood. Convert to markdown and you get a sharp, chapterized, token-efficient version of the book.
MOBI / AZW
Amazon's proprietary Kindle formats. MOBI is the older one, AZW and AZW3 are current. Built to run on Kindle hardware.
- +Kindle devices and apps
- +Sync across the Kindle ecosystem
- −Every non-Amazon reader
- −Non-DRM workflows
- −Direct conversion — most tools choke on AZW
Convert MOBI to EPUB first with Calibre (free, open source), then EPUB to markdown. Two hops, but you end up with something usable.
TXT vs MD
TXT (plain text)
Text without any formatting. Everything a computer can open, going back to the 1960s, can read a TXT file.
- +Universality — opens anywhere, forever
- +Tiny file sizes
- +Logs, notes, quick drafts
- +Being diffed and version-controlled
- −Structure — no headings, no bullets, no bold
- −Anything more than linear prose
- −Encoding surprises (UTF-8 vs Latin-1 vs Windows-1252 will ruin your day at some point)
AI handles TXT fine but can't tell what's a heading. If the document has any structure at all, MD gives better results for the same token count.
MD (Markdown)
Plain text with a tiny layer of formatting rules — # for headings, * for bold, dashes for lists, pipes for tables. Invented in 2004 by John Gruber.
- +Being read by humans as-is
- +Feeding AI models
- +Publishing to web (every static site generator uses it)
- +Version control — diffs are beautiful
- +Token efficiency — no layout overhead
- −Complex page layouts (multi-column, floating images)
- −WYSIWYG editing for non-technical folks
- −Precise print output
This is the target. Every AI tool we've tested — ChatGPT, Claude, Gemini, NotebookLM, Perplexity — performs better on markdown than on any other format we've thrown at them. If you take only one thing from this page: convert your sources to markdown.
HEIC vs JPG vs PNG
HEIC (High Efficiency Image Container)
Apple's modern photo format. About half the file size of JPG at comparable visual quality. Default on iPhones since iOS 11.
- +Small file sizes
- +High-dynamic-range photos
- +The Apple ecosystem
- −Being opened on Windows without extra software
- −Older web uploads and forms
- −Many AI tools still reject it
ChatGPT and Claude will usually accept HEIC now, but support is inconsistent and some tools silently re-encode. Convert to JPG if you want zero surprises.
JPG / JPEG
The everyday photo format. Lossy compression — the file throws away data you probably won't notice — in exchange for small files.
- +Photos of real-world scenes
- +Web upload compatibility
- +Email attachments
- −Screenshots, logos, line drawings (visible artifacts at edges)
- −Anything you plan to re-save multiple times (quality degrades)
- −Transparency — JPGs cannot have transparent backgrounds
Best format for photographic input to AI vision models. Clean scans of documents in JPG work well for OCR.
PNG
Lossless image format. Bigger than JPG for photos, but perfect for anything with sharp edges — screenshots, icons, UI mockups.
- +Screenshots
- +Diagrams, icons, logos
- +Transparency (alpha channel)
- +Document scans where sharpness matters
- −Large photographic images (file sizes balloon)
- −Animation (PNG is static)
If you are screenshotting a document or UI to show an AI, PNG is the right pick. Text stays crisp and OCR accuracy stays high.
CSV vs TSV
CSV (comma-separated values)
Plain text where each line is a row and commas separate the columns. A CSV export usually takes less than a second from any tool that touches tabular data.
- +Moving data between tools (Excel, Sheets, databases)
- +Tiny files compared to XLSX
- +Being read by scripts, pandas, R
- −Values that contain commas (breaks everything unless quoted)
- −Formulas, multi-sheet data, formatting
- −Encoding headaches — Excel can still mangle UTF-8 exports
Works fine, but for small-to-medium tables a markdown table is often more readable and more AI-friendly. CSV wins on raw size once you pass a few hundred rows.
TSV (tab-separated values)
Same as CSV, but columns are separated by tab characters instead of commas. Much more robust when your data has commas in it.
- +Exports from databases and analytics tools
- +Data with commas (addresses, full names, prose)
- +Being pasted into spreadsheets
- −Being edited by hand in a text editor (tabs are invisible)
- −Some older tools still assume commas
Functionally identical to CSV for AI purposes. Pick TSV when your data has commas in it.
HTML vs Markdown
HTML
The language of the web. Every page you visit is HTML — tags wrapped around text to say 'this is a heading, this is a link, this is a list'.
- +Rendering in browsers
- +Being precise about structure
- +Complex layouts and interactivity
- −Being pleasant to read or write by hand
- −Token efficiency — tags add weight
- −Scraped HTML is full of navigation, ads, cookie banners
AI handles HTML, but a page of scraped HTML can easily be 5× the tokens of the equivalent markdown. Strip out the layout, keep the content, convert to markdown.
Markdown (vs HTML)
The same information as HTML, written in about a quarter of the characters. Every markdown file is trivially converted back to HTML at publish time.
- +Writing prose for humans and AI
- +Being diffed and version-controlled
- +Being cheap on tokens
- −Advanced layout (when you actually need it, drop back to HTML)
- −Inline widgets and interactive content
For every web page you want to feed an AI, scrape it and convert to markdown. You will spend 60–80% fewer tokens and get better answers.
JSON vs XML
JSON
The format APIs talk in. Key-value pairs in curly braces, lists in square brackets. Born from JavaScript in the early 2000s and took over the world.
- +API responses
- +Configuration files
- +Being parsed natively in every language
- +Human readability (relative to XML)
- −Comments (not officially supported)
- −Mixed content (text with inline tags)
- −Complex document structures
AI models understand JSON fluently — both reading and generating it. For handing an AI structured data, JSON is usually the best option. For handing an AI documentation about an API, convert to markdown.
XML
The elder statesman of data formats. Every DOCX, XLSX, EPUB, and RSS feed is XML under the hood. Verbose but rigorous.
- +Enterprise systems (SOAP, SAML, etc.)
- +Mixed-content documents
- +Strict validation with schemas
- +Long-term archival
- −Readability — tag pairs double the size
- −API responses (JSON won that war)
- −Most modern tooling (supported but grudgingly)
Workable for AI but expensive on tokens. If you can choose, convert to JSON or markdown first.
Pick a target and stop fighting formats
One theme runs across every row of this page. Proprietary formats are fine for the tool that made them and painful everywhere else. Markdown is almost always the right target when you need to hand something to an AI tool, to a search index, to a new teammate, or to your future self in five years. Next up: the decision tree for picking the right format based on your source and your AI tool. Or jump straight to a tool — PDF to Markdown, Word to Markdown, Excel to Markdown — and try it on a real file.