Markdown Preview
Write markdown and see a live HTML preview. Everything runs in your browser.
Preview
Use this tool from AI agents
This tool's engine is available to AI agents over MCP as render_markdown. Add the Clean.tools server, then your agent can call it directly.
claude mcp add --transport http clean-tools https://mcp.clean.tools/mcpclaude mcp add --transport http clean-tools https://mcp.clean.tools/mcp{"mcpServers":{"clean-tools":{"command":"npx","args":["-y","@clean-tools/mcp"]}}}{"mcpServers":{"clean-tools":{"command":"npx","args":["-y","@clean-tools/mcp"]}}}https://mcp.clean.tools/mcphttps://mcp.clean.tools/mcpOr call it over plain HTTP from any script. Same engine, JSON in and JSON out, no key:
curl -s https://api.clean.tools/v1/render_markdown \
-H 'content-type: application/json' \
-d '{"markdown":"# Title\n\nSome **bold** and *italic* text with a [link](https://clean.tools).\n\n- one\n- two\n\n> a quote"}'curl -s https://api.clean.tools/v1/render_markdown \
-H 'content-type: application/json' \
-d '{"markdown":"# Title\n\nSome **bold** and *italic* text with a [link](https://clean.tools).\n\n- one\n- two\n\n> a quote"}'const res = await fetch("https://api.clean.tools/v1/render_markdown", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"markdown":"# Title\n\nSome **bold** and *italic* text with a [link](https://clean.tools).\n\n- one\n- two\n\n> a quote"})
});
const data = await res.json();const res = await fetch("https://api.clean.tools/v1/render_markdown", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"markdown":"# Title\n\nSome **bold** and *italic* text with a [link](https://clean.tools).\n\n- one\n- two\n\n> a quote"})
});
const data = await res.json();How it works
This markdown previewer uses a custom lightweight parser built in plain JavaScript. It supports headings, bold, italic, inline code, fenced code blocks, links, images, unordered and ordered lists, blockquotes, horizontal rules, and line breaks. Input is sanitized to prevent XSS by escaping angle brackets before parsing. The same parser runs behind the render_markdown API, so you can turn markdown into HTML from scripts or AI agents, or install the @clean-tools/mcp package from npm.
All rendering happens locally in your browser. Your text is never sent to a server. Useful for drafting README files, documentation, blog posts, and notes. Works on mobile and desktop.
Frequently asked questions
Which markdown flavor does this support?
It covers standard markdown plus a few GitHub Flavored Markdown extras: pipe tables with alignment, ~~strikethrough~~, and - [ ] task list checkboxes. It does not support footnotes, definition lists, or embedded raw HTML.
Why is my raw HTML showing as plain text instead of rendering?
Angle brackets are escaped before parsing, so any HTML tags you paste appear literally rather than executing. This is a deliberate security choice that prevents scripts or hidden markup in pasted text from running in your browser.
Why does a link I added point to nowhere?
Link and image URLs are restricted to the http, https, and mailto schemes. Anything else, such as a javascript: URL, is replaced with # to block script injection through crafted links.
Why is text inside `backticks` or a code block not formatting?
Inline code spans and fenced code blocks are intentionally left literal, so **bold** or *italic* markers inside them stay as typed. That lets you document markdown syntax itself without it being interpreted.
Can I use this from the command line or an AI agent?
Yes. Send a POST request to https://api.clean.tools/v1/render_markdown with your markdown and it returns the rendered HTML. The same engine is also exposed as an MCP server you can add to Claude, Claude Code, or Cursor, so an agent can render markdown on its own. Installing the @clean-tools/mcp package from npm runs it as a local stdio server.
More tools from Clean.tools
Use Clean.tools from your AI agent
This tool is also render_markdown on the Clean.tools MCP server — the same engine, callable by your AI agent directly. No key, no signup: requests are processed in memory and request contents are never stored.
claude mcp add --scope user --transport http clean-tools https://mcp.clean.tools/mcpclaude mcp add --scope user --transport http clean-tools https://mcp.clean.tools/mcphttps://mcp.clean.tools/mcphttps://mcp.clean.tools/mcpEvery tool, the REST API, and setup for Cursor, Claude Desktop, VS Code & more →