Ask a chat model a simple question through the API and you often get back a small document: a heading, a bold "Short answer", a numbered list, a tip in a quote block. If your app renders markdown, that looks nice. If it shows the reply as plain text, or reads it aloud, or stores it in a database, the user sees stray ** and ###, and you paid for every one of them.
I wanted to know how much of the bill that formatting actually is. The answer depends almost entirely on one thing: how short the answer is.
A few words first
A token is a chunk of text the model reads or writes; APIs bill per million of them. Output tokens are the ones the model writes, and they cost 2 to 8 times more than input tokens, the ones you send. Markdown is the lightweight formatting syntax most chat models use by default: # for headings, ** for bold, - for bullets, backticks for code. A tokenizer is the program that splits text into tokens; I used tiktoken with the o200k_base encoding. Other vendors' tokenizers split text differently, so their percentages will differ somewhat.
How I measured it
I took three kinds of markdown and made a plain-text copy of each that keeps every word, number, URL and line of code, and removes only the syntax: heading marks, bold and italic markers, backticks, code fences, bullet markers, quote marks, table pipes and table separator rows. Links became text (url), so nothing readable was lost. Images and HTML tags were removed from both versions, since neither shows up in a plain-text UI.
The three samples:
- The 58 dev.to articles I've written so far, about 98,000 tokens of prose-heavy markdown with tables and code.
- The markdown README of every Python package installed on my machine that has one (9 packages, about 17,700 tokens). These are denser: lists, inline code, headings.
- One short answer in the style chat models give by default: two headings, three numbered steps with bold leads, two bullets, a quote-block tip. I wrote it myself, so treat it as an illustration, not a sample.
Prices are list prices from the catalog snapshot of the LLM gateway I work on: gpt-5.6 at $2 per million input tokens and $12 per million output.
What the syntax costs
| Text | Markdown tokens | Syntax share | Syntax cost on gpt-5.6 |
|---|---|---|---|
| 58 articles | 98,125 | 3.4% | $165 per 1M answers of 400 tokens |
| 9 package READMEs | 17,661 | 8.5% | $410 per 1M answers of 400 tokens |
| Short formatted answer | 125 | 21.6% | $324 per 1M answers of 125 tokens |
In long text the markup is a rounding error. Each piece of syntax costs only one to three tokens: **Add a timeout.** is 6 tokens against 4 without the asterisks, a ### heading adds one, a bullet adds one, a code fence two or three. A 400-token paragraph with a heading and a few bold words barely notices.
A short answer is different, because the markup doesn't shrink with the text. A two-line step still gets its bold lead and its list number. In my 125-token example, 27 tokens are syntax, more than a fifth of what you pay for. Table separator rows are the single most expensive item: |---|---|---| is 7 tokens of pure decoration.
The fix: ask for plain text when you show plain text
If your interface doesn't render markdown, say so in the system prompt. Reply in plain text. Do not use markdown formatting. is 11 tokens, billed at input price on every call. On gpt-5.6 that's $22 per million calls; if it removes the 27 syntax tokens from an answer like my example, it saves $324 per million calls. On a cheap model like claude-haiku-5.5 ($0.10 / $0.50) the numbers are $1.10 against $13.50. On every priced chat model in that catalog output costs at least twice as much as input, so 11 input tokens that remove 27 output tokens always come out ahead.
You can check the share on your own replies before you change anything:
import re import tiktoken enc = tiktoken.get_encoding("o200k_base") reply = "### Steps\n\n1. **Add a timeout.** Pass `timeout=10`.\n- It can *hang forever*.\n" plain = re.sub(r"^#+\s+|^\s*[-*+]\s+", "", reply, flags=re.M) plain = re.sub(r"\*\*|`|(?<!\w)\*(?=\S)|(?<=\S)\*(?!\w)", "", plain) a, b = len(enc.encode(reply)), len(enc.encode(plain)) print(a, b, f"{100 * (a - b) / a:.0f}% markdown") It prints 25 18 28% markdown. Run it over a few hundred real responses from your logs and you'll know whether the instruction is worth a line in your prompt.
What this doesn't solve
The big caveat: I measured the syntax, not the length. The plain-text copies contain exactly the same words. In practice, a model told not to use markdown may also write a different answer, shorter or longer, and that difference could easily outweigh a few asterisks. I didn't call any model to check that, so test it on your own prompts and compare the output token counts in the usage field of the responses.
Models don't always obey the instruction. Some keep putting numbered lists or bold text in answers anyway, especially for step-by-step questions. If stray symbols must never reach the user, you still need a strip step on your side, and that step costs nothing in tokens.
Finally, if your app renders markdown, keep it. Headings and lists make long answers easier to read, and at 3-9% of a long reply they're cheap. This only pays off when the formatting is thrown away, and it pays the most on short answers, which are exactly the ones where formatting helps the reader least.

