← Text

Text Redact

Redact sensitive words from text with black blocks. Nothing leaves your browser.

Input

Preview

Use this tool from AI agents

This tool's engine is available to AI agents over MCP as redact_text. Add the Clean.tools server, then your agent can call it directly.

Claude Code
claude mcp add --transport http clean-tools https://mcp.clean.tools/mcp
Claude Desktop (mcpServers)
{"mcpServers":{"clean-tools":{"command":"npx","args":["-y","@clean-tools/mcp"]}}}
Cursor
https://mcp.clean.tools/mcp

Or call it over plain HTTP from any script. Same engine, JSON in and JSON out, no key:

curl
curl -s https://api.clean.tools/v1/redact_text \ -H 'content-type: application/json' \ -d '{"text":"From: Jane Doe <jane.doe@example.com>. Jane Doe approved the invoice.","terms":"Jane Doe, jane.doe@example.com"}'
JavaScript
const res = await fetch("https://api.clean.tools/v1/redact_text", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({"text":"From: Jane Doe <jane.doe@example.com>. Jane Doe approved the invoice.","terms":"Jane Doe, jane.doe@example.com"}) }); const data = await res.json();

How it works

Enter your source text and a comma-separated list of words or phrases to redact. The tool replaces each match with black block characters (██████). By default it matches whole words only, so redacting "ann" will not touch "annual". Turn on fixed-width blocks to hide how long each redacted term was, or toggle case-sensitive matching. The preview updates live as you type. You can also run the same redaction from scripts or AI agents through the Clean.tools API, or install the @clean-tools/mcp package from npm to call the redact_text engine.

All processing runs entirely in your browser using JavaScript string operations. No data is sent to a server. Your text never leaves your device. No signup, no tracking.

Frequently asked questions

Is the hidden text really gone from the copied output?

Yes. The tool builds a new string in which each matched term is replaced by block characters, and only that string is placed on your clipboard. The original letters are not tucked behind the blocks or stored in the copied text, so pasting it elsewhere reveals nothing.

Why doesn't redacting "ann" also redact "annual"?

Whole words only is on by default, so a term is redacted only when it stands alone between non-letter, non-number boundaries. Turn that toggle off if you want partial matches, for example to blank out every string that contains "ann".

Can I stop the blocks from revealing how long each term was?

Turn on fixed-width blocks. Every redacted term then becomes the same eight-character bar, so an eight-letter name and a two-letter word look identical and the length of the original is not leaked.

How do I redact a phrase that contains a comma?

The word list is split on commas, so a single term cannot include one. Enter each comma-free part as its own term; every part is still matched and redacted, and phrases with spaces (like "Oak Street") work fine as long as they contain no comma.

Can I use this from the command line or an AI agent?

Yes. The same engine is available as a REST endpoint at https://api.clean.tools/v1/redact_text, so you can POST text and terms as JSON from curl or any script. It also runs as an MCP server you can add to Claude, Claude Code, or Cursor. The @clean-tools/mcp package on npm launches it as a local stdio server so your agent can call the redaction tool directly.

More tools from Clean.tools

View all tools

Use Clean.tools from your AI agent

This tool is also redact_text 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 Code
claude mcp add --scope user --transport http clean-tools https://mcp.clean.tools/mcp
Any MCP client (streamable HTTP, authless)
https://mcp.clean.tools/mcp

Every tool, the REST API, and setup for Cursor, Claude Desktop, VS Code & more →