HCODX/Markdown Compactor
100% browser-based · Strip markup · LLM-friendly

Markdown Compactor

Compact markdown to plain text. Remove heading markers, link syntax, bold/italic markup, code fences — keep the meaning, save the tokens. Useful before pasting documentation into LLM prompts.

Markdown
Plain text
Compact options
Markdown to HTML
Input size
0 B
Output size
0 B
Saved
Status
Ready
Example

Markdown in, plain text out

Markup is expensive in tokens. Strip the syntax and only the meaning remains — easier to feed an LLM, easier to read in plain channels.

Markdown
# Heading
**Bold** and _italic_ text.
- list item
Plain text
Heading
Bold and italic text.
list item
Use cases

What you'll use this for

Take a markdown doc, strip the markup, paste somewhere that doesn't render it — or save tokens before sending to an LLM.

Prep for LLM prompts

Drop README files and docs into prompts without paying for the markup tokens.

Paste into Slack

Some channels render half the syntax. Strip it for clean copy-paste.

Copy to plain text

Email, SMS, status pages — destinations that don't render markdown.

Archive content

Long-term plain-text archives outlive markdown flavors.

Step by step

How to compact markdown

1

Paste markdown

Drop it into the left editor. Headings, links, emphasis, code — all recognized.

2

Pick what to strip

Defaults remove headings, emphasis, and links. Toggle list markers and code fences if you want them gone too.

3

Click Compact

Or leave auto-compact on for live updates.

4

Copy or download

See bytes saved at the top of the page.

FAQ

Frequently asked questions

CommonMark-style markup: ATX headings (#), bold/italic (**, *, _), inline code (`code`), fenced code blocks (```), links ([text](url)), and list markers. GFM tables are preserved as plain text.

Yes. [text](url) becomes text when Unwrap links is on. The URL is dropped.

Yes. Runs entirely in your browser, no signup.

Compaction discards markup, so it's not perfectly reversible. If you need markdown from plain text, try the HTML to Markdown converter on a rendered version.

Typically 5–15% on heading-heavy docs, more if there are lots of links. The stats bar shows exact bytes saved.

About

About markdown compaction

Markdown is human-friendly source code. When pasted into an LLM, the syntax characters (#, *, _, [, ], (, )) are tokenized along with the content — increasing cost and sometimes confusing the model when prompting about prose semantics.

What gets stripped

  • Headings — leading # characters.
  • Emphasis**bold**, *italic*, inline `code`.
  • Links[text](url)text.
  • Code fences — opening and closing ``` markers (content kept).
  • List markers-, *, +, and ordered 1..

What is preserved

  • All prose content and code block contents.
  • Line breaks between paragraphs (collapsed if 3+ newlines).
Related

Related tools