For interactive analysis in ChatGPT or Claude, use CSV — the most token-dense format for flat tabular data. Use JSONL for fine-tuning, batch API calls, and RAG pipeline ingestion. Use plain text or Markdown for prose documents. XLSX works natively in ChatGPT but adds friction in Claude. Picking the wrong format inflates token usage, blocks the analysis tool, or both.
TL;DR: The format decision is driven by workflow — CSV for interactive chat-based analysis, JSONL for AI pipelines, plain text for prose documents. JSON adds the column name as a key on every row; for large flat tables this makes the same data substantially more token-expensive than the equivalent CSV. Format Converter handles CSV, JSON, JSONL, and Excel conversions entirely in your browser — no file leaves your device before you decide where it goes.
A 50,000-row CRM export sent to Claude as JSON returned a context limit warning before analysis began. The same dataset as CSV fit within Claude's 500MB file limit and processed without issue. The difference was not the data — it was the key-per-row overhead that JSON adds to every column in every row of a flat table.
Table of Contents
- Format Comparison Matrix
- Why Format Matters for AI
- CSV: the Default for Interactive Analysis
- JSON: Schema-Aware Queries and Nested Data
- JSONL: the Standard for AI Pipelines
- XLSX: ChatGPT Native, Claude Awkward
- Markdown and Plain Text: for Documents, Not Tables
- How to Pick the Right Format
- Additional Resources
- FAQ
Format Comparison Matrix
The right format depends on two things: your task (interactive chat vs. pipeline ingestion) and your target platform (ChatGPT, Claude web, or Claude API). CSV is the best default for interactive spreadsheet analysis — the most token-efficient format for flat tabular data because the header row is written once. JSONL is the industry standard for fine-tuning, batch processing, and RAG ingestion. XLSX works natively in ChatGPT but requires the Analysis tool in Claude. Plain text and Markdown are correct for prose documents, not for tables.
| Format | ChatGPT Data Analysis | Claude web | Claude API | Token economy | Best use case |
|---|---|---|---|---|---|
| CSV | Native (~50MB cap) | Native (~500MB cap) | Text block or Files API | Lowest for tabular data — header once | Interactive analysis, large row counts |
| JSON | Text or file block | Text or file block | Text block | Higher than CSV — key name on every row | Schema-aware queries, nested structures |
| JSONL | Text or file block | Text or file block | Text block or Files API | Moderate — keys per row, but streamable | Fine-tuning, Batch API, RAG ingestion |
| XLSX | Native (~50MB cap) | Requires code execution and file creation | Not accepted as document | Binary — not tokenized directly | ChatGPT-only; convert to CSV for Claude |
| Markdown / plain text | Text block | Document block | Document block | Lowest for prose; poor for tabular data | Reports, summaries, structured prose |
Sources: OpenAI File Uploads FAQ · Claude: Upload Files to Claude · OpenAI Fine-tuning Guide
Why Format Matters for AI
Format is not just a container — it changes how much of your data the AI can see and how much reasoning budget remains after the file is ingested. Choosing CSV over JSON for the same 50,000-row dataset can mean the difference between a single analysis pass that fits the context window and a truncated run that misses half your records.
The first mechanism is token economy: CSV encodes column names once in the header, then repeats only values. JSON encodes the column name as a key alongside the value on every row — for a flat table with 10 columns and 10,000 rows, those key names appear 10,000 times rather than once. The exact token difference depends on key length, value types, and encoding, but the direction is consistent: JSON is more token-expensive than CSV for flat tabular data.
The second is platform behavior: each platform parses formats differently, and format determines whether your data is readable at all — not just how much context it consumes. ChatGPT's Data Analysis tool loads CSV and XLSX natively into an in-memory dataframe, a binary operation that does not consume your context window the way raw text does. Claude reads CSV as a text block; the Claude API does not accept XLSX as a document type.
CSV: the Default for Interactive Analysis
CSV (RFC 4180) is the right default for uploading tabular data to ChatGPT or Claude for interactive analysis. It is universally supported, has no formatting overhead, and gives you the most rows per token budget of any tabular format. If your goal is "load this dataset into the AI and ask questions about it," start with CSV.
When CSV is the right call:
- Interactive analysis in ChatGPT or Claude web — the data fits in a single upload and you are asking ad hoc questions
- Large row counts — CSV's header-once structure means more rows fit before the context window fills
- Downstream pipeline input — CSV is a universal import format for every downstream tool
What to check before uploading:
- File size under ~50MB for ChatGPT and ~500MB for Claude web — if it exceeds these, split by rows first (How to Split a Large CSV for ChatGPT Without Uploading It)
- Encoding is UTF-8 — Windows-default ANSI encoding breaks Claude's parser on non-ASCII characters
- No mid-row line breaks in free-text fields — these appear as extra rows to the parser
For a full breakdown of ChatGPT's row capacity and token math, see How Many Rows Can ChatGPT Handle?.
JSON: Schema-Aware Queries and Nested Data
JSON (ECMA-404) is the right format when your data is nested, when the AI needs to reason about schema rather than just values, or when you are passing a small dataset where the key-per-row overhead is acceptable. For large flat tables, it is usually the wrong choice.
When JSON earns its overhead:
- Nested structures — a customer record with an array of orders embedded inside it cannot be naturally represented in CSV; JSON preserves the hierarchy
- Schema-aware queries — asking the AI to describe or validate the data model is easier when the keys are self-describing per record
- Small datasets where token budget is not a constraint — a 200-row configuration file or a small API response
The cost to keep in mind:
For flat tabular data, JSON repeats the column name as a key on every row — a table with columns date, vendor, amount, and category encodes those four key strings 10,000 times across 10,000 rows. The token overhead is not a fixed number (it depends on key length, value types, and whitespace) but it is always higher than the equivalent CSV. For large datasets, this is the primary reason JSON can hit context limits before CSV does.
JSONL: the Standard for AI Pipelines
JSONL (JSON Lines) is the standard input format for OpenAI's fine-tuning API, the Batch API, and most RAG ingestion pipelines — each line is a self-contained JSON object, making it ideal for streaming and systems that process records one at a time. For the fine-tuning schema, the required messages-array format, and a worked conversion example, see Convert Excel to JSON for AI APIs and LLM Pipelines.
When JSONL is the right call:
- Fine-tuning — OpenAI's fine-tuning API requires JSONL with a specific messages-array schema
- Batch API — OpenAI's Batch API accepts JSONL for asynchronous processing of many requests at once
- RAG ingestion — LangChain document loaders, LlamaIndex, and most vector database connectors accept JSONL as a first-class input format
For the Excel → JSONL workflow, including how to export an .xlsx sheet directly to JSONL, see Excel File Too Big for AI? Reduce It in Your Browser First.
XLSX: ChatGPT Native, Claude Awkward
XLSX (ECMA-376) is the only format here that uploads to ChatGPT without pre-processing — the Data Analysis tool loads it natively alongside CSV, with the same ~50MB effective cap. For Claude, XLSX requires code execution and file creation to be explicitly enabled in account settings; without it, Claude cannot parse the binary format.
ChatGPT: XLSX uploads work out of the box. The practical reason to convert to CSV anyway is file size — Excel's XML overhead (styles, shared strings, theme files) means an XLSX file is often 5–10x larger than the equivalent CSV for the same data. If your XLSX is near the 50MB cap, exporting to CSV almost always resolves it.
Claude web: Upload requires code execution and file creation to be enabled. If you are unsure whether it is active, export to CSV — Claude reads CSV as a text document without any special tooling.
Claude API: XLSX is not a supported document block type. Convert to CSV (or plain text) before passing data through the API.
For a full breakdown of what causes Excel bloat and how to strip it before upload, see Excel File Too Big for AI? Reduce It in Your Browser First.
Markdown and Plain Text: for Documents, Not Tables
Markdown and plain text are the correct formats for prose content — reports, summaries, structured analysis narratives, documentation. They are not suited for tabular data: Markdown tables are token-expensive and error-prone to generate at scale; plain text with tab or space delimiters is fragile and often misread.
If your analysis involves a mix of data and narrative, keep the data as CSV and the narrative as a separate plain-text prompt. Mixing formats in a single file rarely improves how the AI processes either component.
How to Pick the Right Format
The format decision has four inputs. Work through them in order and the right format becomes unambiguous.
-
What is your task?
- Interactive chat analysis → CSV
- Fine-tuning a model → JSONL (OpenAI fine-tuning schema)
- Batch API or RAG pipeline → JSONL
- Document summary or Q&A → Markdown or plain text
- Nested data or schema validation → JSON
-
Which platform are you targeting?
- ChatGPT Data Analysis → CSV or XLSX (XLSX if under 50MB and you prefer the Excel workflow)
- Claude web → CSV (XLSX requires Analysis tool; default to CSV to avoid dependency)
- Claude API → CSV as a text block, or the Files API for structured data
-
What is the shape of your data?
- Flat rows and columns → CSV
- Nested records (orders with line items, users with addresses) → JSON or JSONL
- One logical object per line for a pipeline → JSONL
- Prose with light structure → Markdown
-
Do you need to convert? If your source file is XLSX or JSON and your target format is CSV or JSONL, convert before uploading. Format Converter handles all four conversions locally — the source file is processed on your device and only the output goes anywhere.
Converting locally also removes an intermediate data exposure — all three major AI platforms (ChatGPT, Claude, and Gemini) train on consumer conversations by default, so every upload reaches a system that may retain and train on your data; a converter adds a second exposure before the AI tool ever sees the file. For files containing customer records, financial data, or personally identifiable information, convert in your browser so the raw file never leaves your environment. For removing sensitive columns before any conversion, see How to Remove PII From a CSV Before Using AI.
If you are choosing a format for general business data workflows — not AI ingestion — the decision criteria are different. For sharing, storage, import compatibility, and tool interoperability outside the AI context, see CSV vs JSON vs Excel: Format Comparison for Business Data.
Additional Resources
How this guide was built: Format behavior verified against OpenAI and Anthropic documentation, May 2026. Token-economy observations from direct testing with Format Converter, ChatGPT Plus, and Claude web and API. JSONL schema requirements from the OpenAI fine-tuning guide. Platform caps from the OpenAI File Uploads FAQ and Claude support documentation.
- OpenAI: File Uploads FAQ — ChatGPT upload frequency limits, the ~50MB spreadsheet cap, and per-file hard cap (512MB).
- OpenAI: Fine-tuning Guide — JSONL schema requirements for fine-tuning jobs; the authoritative reference for JSONL in AI pipelines.
- Claude: Upload Files to Claude — Confirms XLSX requires code execution and file creation to be enabled; CSV accepted natively.
- RFC 4180 — The CSV structural standard; defines delimiter rules, quoting, and line endings.
- ECMA-404 — The JSON data interchange standard.
- MDN: Web Workers API — How browser-based workers run format conversion on your device without a server.
- How Many Rows Can ChatGPT Handle? — The 50MB cap, token math by row type, and size estimates by data type.
- How to Split a Large CSV for ChatGPT Without Uploading It — Step-by-step workflow for chunking CSV files that exceed the upload cap.
- Excel File Too Big for AI? Reduce It in Your Browser First — Stripping Excel bloat, splitting by sheet, and exporting to JSONL.
- How to Convert Excel to JSON — Full JSONL and JSON conversion options for AI pipelines.
- CSV vs JSON vs Excel: Format Comparison for Business Data — General-purpose format comparison for sharing, storage, and import — not AI-specific.
- Prepare CSV & Excel Data for AI — Complete Guide — The full local-prep workflow: split, shrink, clean, mask, and convert before any file reaches an AI tool.
FAQ
Convert to the Right Format Before Uploading
Use CSV for interactive analysis — header-once structure keeps token costs low across large row counts Use JSONL for fine-tuning, batch API, and RAG pipelines — the industry-standard input format, column names embedded per record Convert XLSX to CSV before Claude uploads — removes the Analysis tool dependency and almost always reduces file size Convert locally so your raw file stays on-device — no intermediate server sees the data before it reaches the AI tool