TokenPad
Format

Markdown to Plain Text for Prompts

Strip formatting the model does not need and you are paying for.

Your input

203 characters10 lines0 tokensor drop a file

Markdown StripperExact
0Token change
Token change0no change
Input tokens0what you pasted
Output tokens0what you would send
Token cost of this result
Output tokens0
As input$0.00
× 100K requests$0.00

Everything on this page runs in your browser. Nothing you paste is transmitted, because there is no server here to transmit it to.

Result
 

What markdown syntax costs

Heading hashes, emphasis asterisks, list bullets and link URLs all consume tokens. A link in particular is expensive: the visible text is what carries meaning, and the URL beside it is frequently thirty tokens of characters the model will never usefully act on.

On a documentation corpus fed into retrieval, stripping syntax typically removes ten to twenty percent of the tokens with no loss of information the model uses.

What to keep

Keep list markers when the sequence matters — steps in a procedure, ranked options. The bullet is cheap and the structure genuinely aids comprehension.

Keep code blocks when the code is the subject. Strip them when you are feeding prose documentation and the examples are incidental, because code is token-dense and dilutes retrieval.

Keep link text almost always. Drop the URLs almost always. The exception is when you want the model to cite sources back to the user.

The case for keeping some structure

There is a real tension here. Headings are cheap and they help a model locate information in a long document, which is why removing them wholesale is not automatically right.

A reasonable compromise for retrieval pipelines is to strip inline syntax aggressively while keeping heading text as a plain line — you lose the hashes and keep the signposting.

Frequently asked questions

Should I strip markdown before embedding for RAG?
Usually yes for inline syntax, because the symbols add noise to the embedding without adding meaning. Keep heading text, since it carries topic information that helps both retrieval and the model reading the chunk later.
What about tables?
Markdown tables survive this tool because the pipes carry structure. If the table is large, converting it to CSV is considerably cheaper — see the data format optimizer.

More format tools