All tools

Compress Markdown

AI / Agent

Normalize and compress markdown: strip frontmatter, collapse blank lines, remove comments to reduce token count.

Notes exported from Notion or Obsidian, or long README files, tend to accumulate YAML frontmatter and redundant blank lines that cost tokens without adding information, and this strips both before you send the document as LLM context, leaving more room for your actual question when working against a token-limited model. Code block contents are preserved exactly as-is, and links, images, and inline formatting are left untouched, since only whitespace and non-content elements get removed. Collapsing blank lines can slightly change spacing if you re-render the result, but headings, lists, and code blocks stay structurally intact. Nothing here is uploaded: normalization runs entirely in your browser.

markdowncompresstokensllmcontextnormalize

How to use Compress Markdown

  • 1.Paste a markdown document with YAML frontmatter and extra blank lines to strip both before sending it as LLM context.
  • 2.Use it to clean up exported documentation or notes (from Notion, Obsidian, etc.) that are full of redundant blank lines and comments.
  • 3.Run it on long README files before pasting them into a chat with a token-limited model to make more room for your actual question.

Frequently asked questions

Does this change the rendered appearance of the markdown?
Collapsing blank lines can slightly change spacing when re-rendered, but headings, lists, and code blocks remain structurally intact.
Does it strip code blocks too?
No, code block contents are preserved as-is; only frontmatter, comments, and redundant blank lines outside of code blocks are removed.
Is my document sent to a server?
No, compression runs entirely in your browser.
Will this break markdown links or images?
No, links, images, and inline formatting syntax are left untouched — only whitespace and non-content elements are removed.

Use via API, SDK, or MCP

cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/compress-markdown \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"markdown":"# Title\n\nThis is a paragraph with **bold** text.","collapseBlankLines":true,"removeComments":true,"stripFrontmatter":false}'

Get an API key from your dashboard · Full API docs →