← All Tools

🧼 Markdown Cleaner / Link Stripper

Turn copied docs, scraped markdown, and LLM output into lean prompt-ready Markdown or plain text without fetching remote assets.

Prompt-ready cleanup

  • Preserves headings, paragraphs, lists, and fenced code blocks by default.
  • Removes image markdown, heavy asset URLs, link destinations, basic repeated navigation, HTML tags, and excess blank lines.
  • Reports before/after characters and estimated tokens saved.
  • It never fetches remote pages or assets; paste only the Markdown you want cleaned.
Runs in your browser

Markdown cleaning runs locally in your browser and does not fetch remote links or images. Pasted docs can still contain private URLs, customer text, or secrets.

What this tool does

Markdown Cleaner removes deterministic prompt noise from copied Markdown while keeping the useful text structure.

Why it is useful

It lowers token spend for agents by stripping heavy links, image assets, wrapper HTML, duplicate navigation, and excess whitespace before context is sent to an LLM.

How it works

The shared core temporarily protects fenced code blocks, removes selected link/image/HTML noise, collapses whitespace, and emits cleaned Markdown plus plain text.

Best input

Use copied documentation, release notes, README fragments, or LLM output that has useful text mixed with navigation and asset clutter.

Agent workflow tip

Copy the JSON summary to track estimated token savings and cleanup settings across prompt experiments.

Privacy note

Cleaning happens locally in your browser unless you choose the API route for automation.

Important limitation

Removing URLs can remove citation or provenance context. Keep a source copy when auditability matters.

Quick answers

Does it fetch linked pages?

No. It only rewrites the text you paste.

Will code blocks survive?

Fenced code blocks are preserved by default, but inline Markdown formatting may still be simplified in plain-text output.

API examples

Call the same deterministic core through Utilito’s compact API router. Send only data you intentionally submit to the server-side endpoint.

Try in API playground →Schema →
Clean Markdown with curl
curl
curl -X POST https://utilito.dev/api/run \
  -H "Content-Type: application/json" \
  -d '{"tool_id":"markdown-cleaner","input":{"input":"# Release notes\n\n![hero](https://cdn.example.com/hero.png)\n\nRead the [full docs](https://example.com/docs) before upload.\n\n- Home\n- Privacy\n\nFinal useful paragraph."}}'
Clean Markdown from JavaScript
javascript
const res = await fetch('https://utilito.dev/api/run', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    tool_id: 'markdown-cleaner',
    input: { input: '# Release notes\n\n![hero](https://cdn.example.com/hero.png)\n\nRead the [full docs](https://example.com/docs) before upload.\n\n- Home\n- Privacy\n\nFinal useful paragraph.' }
  })
});
const data = await res.json();
console.log(data.result.output || data.result.report);
Clean Markdown from Python
python
import requests
payload = {
    "tool_id": "markdown-cleaner",
    "input": {"input": "# Release notes\n\n![hero](https://cdn.example.com/hero.png)\n\nRead the [full docs](https://example.com/docs) before upload.\n\n- Home\n- Privacy\n\nFinal useful paragraph."},
}
result = requests.post("https://utilito.dev/api/run", json=payload).json()["result"]
print(result.get("output") or result.get("report"))

Common Use Cases

Clean docs for RAG snippets

Remove navigation, images, and long URLs from copied docs before chunking them.

Strip link destinations for prompts

Keep human-readable link text while dropping token-heavy tracking URLs.

Prepare LLM output for notes

Remove wrapper HTML and repeated nav lines while preserving headings and code fences.

Writing & Markdown Toolkit workflow

Move from word and reading-time checks into Markdown preview, Markdown cleanup, and LLM-output cleanup while keeping pasted writing local to the browser.

📝Word Counter⏱️Reading Time Calculator✍️Markdown Preview🧼LLM Output CleanerAaCase Converter📄Lorem Ipsum Generator
View all in Text →