Home / Blog / Markdown

Why ChatGPT and Claude
Output Markdown by Default

You didn't ask for bullet points. You didn't request bold headings. But every major AI — ChatGPT, Claude, Gemini, Grok — responds in Markdown regardless. This is not a UI quirk. It is a deliberate design decision rooted in three converging forces: token economics, training data distribution, and cognitive architecture.

Open any conversation with ChatGPT, Claude, Gemini, or Grok and ask a question of any meaningful length. What comes back? A heading, some bullet points, probably a bolded key term or two, and maybe a fenced code block if the subject is technical. You are receiving Markdown. Every time.

Most people treat this as a feature — the AI is being nicely organized. But the real question is: why does this happen at all? Nobody asked the AI to format its response. The user typed a plain English question. The AI chose Markdown. That choice has reasons, and understanding them tells you something important about how large language models actually work.

~70%
Token savings vs HTML
4+
Major LLMs default to Markdown
2004
Year Markdown was created
Platforms that render it

Reason 1: Token Economics

Every word an LLM generates costs a token. Tokens are the fundamental unit of LLM computation — roughly 4 characters or 0.75 words each, depending on the tokenizer. Tokens are literally the currency of AI. You pay per token on every API call. The model has a context window measured in tokens. Response speed is limited by tokens generated per second. Everything in the LLM world is denominated in tokens.

This is why format matters enormously. Expressing structured content — a list, a heading, a code sample — in Markdown requires dramatically fewer tokens than expressing the same structure in HTML.

Consider the same content rendered two ways:

# Markdown — 47 tokens
## Key Formats **JSON** — data layer **JSONL** — training layer **Markdown** — output layer
47 tokens. Structurally complete. Human-readable as-is.
<html> Equivalent — 134 tokens
<h2>Key Formats</h2> <ul> <li><strong>JSON</strong> — data layer</li> <li><strong>JSONL</strong> — training layer</li> <li><strong>Markdown</strong> — output layer</li> </ul>
134 tokens. 185% more expensive. Same information.

That 185% markup in token cost is not trivial. Multiply it across a long, detailed response — say a 2,000-token reply — and the HTML version would consume nearly 4,000 tokens for the same content. That means higher API bills, slower responses, and a response that hits the context window limit sooner. Markdown is the economically rational choice.

Relative token cost to express the same structured content
Markdown
30%
~47 tokens
Plain text
22%
~35 tokens
HTML
100% baseline
~134 tokens
XML
88%
~118 tokens

Plain text is even more token-efficient than Markdown, but it loses all structure — no headings, no lists, no code blocks. Markdown sits in the exact sweet spot: near-minimal token cost with full structural expressiveness.

Reason 2: The Training Data Was Already Markdown

Language models learn by example. They are trained on trillions of tokens of text scraped from the internet, and that text overwhelmingly favors Markdown-formatted content. This is not a coincidence — it is the reality of where high-quality, structured text lives on the web.

Consider the major sources that constitute the backbone of every major LLM's pretraining corpus:

GitHub
Format: Markdown (.md)
Hundreds of millions of README files, wikis, issues, pull requests, and documentation pages — all written in Markdown. GitHub is one of the single largest sources of high-quality, structured developer text on the internet.
Stack Overflow
Format: Markdown (raw data)
The raw Stack Overflow data dump, widely used in LLM pretraining, is in Markdown format. Millions of Q&A posts with formatted code blocks, bold terms, and structured answers — all Markdown.
Reddit
Format: Markdown (comments)
Reddit comments use a Markdown-like syntax. Billions of conversations, forum threads, and technical discussions are formatted with asterisks, backticks, and pound signs that correspond directly to Markdown conventions.
Technical Documentation
Format: Markdown / MDX
Virtually every modern documentation site — from React to Python to AWS — is built with Markdown source files. Docusaurus, MkDocs, GitBook, Mintlify, Nextra: all Markdown-first.
Academic Papers (via arXiv)
Format: LaTeX → converted MD
Papers converted to Markdown or plain-text formats for inclusion in pretraining corpora carry headings, lists, and structured sections that mirror Markdown conventions.
Developer Blogs & Substack
Format: Markdown / HTML from MD
The vast majority of technical blogs — whether on Medium, Substack, Hashnode, or personal sites — are written in Markdown and published as HTML. The source structure is Markdown.

The result: when an LLM generates a response, it is pattern-matching against a training corpus where the highest-quality, most-structured, most-authoritative text is overwhelmingly formatted in Markdown. Generating Markdown is simply what "writing well" looks like to these models. It is the distribution of excellent writing in their training data.

Raw Stack Overflow data used for LLM pretraining is explicitly stored in Markdown format. GitHub, Reddit, and technical documentation sites together represent a disproportionate fraction of the highest-quality text in every major pretraining corpus.

— LLMDataHub, GitHub (multiple pretraining corpus surveys)

Reason 3: Structural Cognition

Here is the subtler reason — one that is easy to miss. Markdown does not just make responses look organized. It helps the model think in an organized way.

When a language model generates tokens one at a time, each new token is conditioned on everything that came before. Generating a ## heading token at the start of a section commits the model to writing a focused, topically coherent section. Generating a - list marker commits the model to writing a discrete, parallel item. Generating a triple-backtick fence commits the model to writing code in a specific language.

These formatting markers act as cognitive scaffolding. They constrain the model's output distribution in ways that produce better responses:

This is why responses that use Markdown structure tend to be more accurate, more complete, and better organized than the same prompt answered in plain prose. The format is doing real cognitive work, not just cosmetic work.

Reason 4: The Chat Interface Decision

The first three reasons explain why Markdown emerged naturally from LLM pretraining. The fourth reason explains why it became the explicit standard: the teams building ChatGPT, Claude, and Gemini made a deliberate product decision to render Markdown in their chat interfaces.

When OpenAI launched ChatGPT in November 2022, they built the chat interface to render Markdown automatically. A response that starts with # becomes a large heading. Stars around a word make it bold. Triple backticks render a syntax-highlighted code block. This created a self-reinforcing loop:

Anthropic made the same decision for Claude. Google for Gemini. X AI for Grok. Once one major player committed to Markdown rendering, the others followed — because a plain-text response in an interface that renders Markdown looks comparatively sloppy.

📌 How to turn it off

Most LLMs will switch to plain text if you ask. In your system prompt or message, say: "Respond in plain text without any Markdown formatting." Useful when piping LLM output to a TTS system, a legacy dashboard, or any system that displays Markdown as raw syntax rather than rendering it.

Reason 5: The llms.txt Effect (2024–Present)

The relationship between LLMs and Markdown has recently gone in a new direction. In September 2024, Jeremy Howard (co-founder of fast.ai and Answer.AI) proposed a new standard: llms.txt — a Markdown file at your website's root, written specifically for AI crawlers rather than humans.

The premise: LLMs can parse HTML, but they waste tokens on navigation menus, footers, ads, and JavaScript-rendered content. A clean Markdown file at /llms.txt gives AI models a direct, token-efficient map to your site's most important content.

The llms.txt spec is intentionally lean. It is built on Markdown because that is the "native language" of LLMs — no complex parsing required. Clean Markdown reduces hallucinations by 30–70% by eliminating HTML noise.

— llms.txt adoption guide, 2025

The standard spread rapidly. Adoption remained niche until November 2024, when Mintlify rolled out support for llms.txt across all the documentation sites it hosts — practically overnight, thousands of docs sites, including Anthropic and Cursor, began supporting it. By 2025, Cloudflare, Vercel, Anthropic, and Astro all backed it.

What makes llms.txt significant for our purposes is what it reveals: the AI industry has explicitly recognized Markdown as the preferred communication format between AI systems and the web. Not HTML. Not JSON. Markdown. Clean Markdown reduces token consumption by 50–70%, making it much more likely that the model will read your content.

The Feedback Loop Is Now Permanent

All five reasons reinforce each other. The training data was Markdown. The models learned to produce Markdown. The interfaces rendered it beautifully. The RLHF process rewarded it. The industry standardized on it. And now a new generation of developers is building tools and pipelines that explicitly assume their LLM's output will be Markdown.

Claude Code stores its context in Markdown files. LLM-powered documentation platforms expect Markdown. Cursor, Obsidian, Notion, Linear — all use Markdown as their native format. The llms.txt standard assumes Markdown. The entire agentic software stack is being built with Markdown as the shared language between AI systems and the world.

This is why understanding Markdown is not just a nice-to-have for developers working with AI. It is foundational. Markdown is to LLM output what JSON is to API responses — the format you will always encounter, and the format you need to handle correctly.

✅ Practical Takeaways

For developers: Parse Markdown output from LLMs using a CommonMark-compliant library like markdown-it-py in Python. Use regex only for quick tasks like extracting code blocks.

For app builders: Always render LLM output as Markdown in your UI. Never display raw asterisks and pound signs to end users.

For content creators: If you want AI to cite your site accurately, consider adding an /llms.txt Markdown file. Anthropic, Cursor, and Vercel already have one.

For everyone: Learn Markdown. It takes 20 minutes and it is now the lingua franca of human–AI communication.

The Bottom Line

ChatGPT and Claude output Markdown by default because it is simultaneously the cheapest format to generate (token efficiency), the most natural format to produce (training data distribution), the most cognitively useful format (structural scaffolding), and the most practical format to display (UI rendering).

It is not a coincidence. It is not a bug. It is the convergence of economic incentives, statistical learning, product decisions, and industry standardization — all pointing at the same 20-year-old plain-text formatting language that John Gruber wrote in 2004 because he was tired of writing HTML.

That's the thing about Markdown. It was designed for humans. It turned out to be perfect for AI too.